// Path: src/com/fieldexpert/fbapi4j/common/StringUtil.java
// public static String collectionToCommaDelimitedString(Collection<?> col) {
// 	return collectionToDelimitedString(col, ",");
// }
// 
// Path: src/com/fieldexpert/fbapi4j/common/Assert.java
// public class Assert {
// 
// 	public static void notNull(Object object, String message) {
// 		if (object == null) {
// 			throw new IllegalArgumentException(message);
// 		}
// 	}
// 
// 	public static void notNull(Object object) {
// 		notNull(object, "[Assertion failed] - this argument is required; it must not be null");
// 	}
// }
// 
// Path: src/com/fieldexpert/fbapi4j/common/Attachment.java
// public class Attachment {
// 
// 	static {
// 		registerMimeDetector(ExtensionMimeDetector.class.getName());
// 		registerMimeDetector(MagicMimeMimeDetector.class.getName());
// 	}
// 
// 	public static String getType(File file) {
// 		Collection<?> types = getMimeTypes(file);
// 		return getMostSpecificMimeType(types).toString();
// 	}
// 
// 	public static String getType(InputStream is) {
// 		Collection<?> types = getMimeTypes(is);
// 		return getMostSpecificMimeType(types).toString();
// 	}
// 
// 	public static String getType(byte[] bytes) {
// 		Collection<?> types = getMimeTypes(bytes);
// 		return getMostSpecificMimeType(types).toString();
// 	}
// 
// 	private String filename;
// 	private String type;
// 	private InputStream content;
// 
// 	// not for you
// 	protected Attachment(String name) {
// 		this.filename = name;
// 	}
// 
// 	public Attachment(String filename, String type, byte[] content) {
// 		this(filename, type, new ByteArrayInputStream(content));
// 	}
// 
// 	public Attachment(String filename, String type, String content) {
// 		this(filename, type, content.getBytes(Charset.forName("UTF-8")));
// 	}
// 
// 	public Attachment(String filename, String type, InputStream content) {
// 		this.filename = filename;
// 		this.type = type;
// 		this.content = content;
// 	}
// 
// 	// can't chain this constructor call, because we need to try/catch
// 	public Attachment(File file) {
// 		Assert.notNull(file);
// 
// 		this.filename = file.getName();
// 		this.type = getType(file);
// 		try {
// 			this.content = new FileInputStream(file);
// 		} catch (Exception e) {
// 			throw new RuntimeException("Error reading file: '" + file.getName() + "'");
// 		}
// 	}
// 
// 	public InputStream getContent() {
// 		return content;
// 	}
// 
// 	public String getFilename() {
// 		return filename;
// 	}
// 
// 	public String getType() {
// 		return type;
// 	}
// }
// 
// Path: src/com/fieldexpert/fbapi4j/common/DateFormatUtil.java
// public class DateFormatUtil {
// 	public static final String FB_DATE = "yyyy-MM-dd'T'HH:mm:ss'Z'";
// 
// 	private static DateFormat getParser() {
// 		return new SimpleDateFormat(FB_DATE);
// 	}
// 
// 	public static String format(Date date) {
// 		return date == null ? null : getParser().format(date);
// 	}
// 
// 	public static Date parse(String date) {
// 		if (date == null || date.equals("")) {
// 			return null;
// 		}
// 		try {
// 			return getParser().parse(date);
// 		} catch (Exception e) {
// 			throw new RuntimeException(e);
// 		}
// 	}
// 
// }


import static com.fieldexpert.fbapi4j.common.StringUtil.collectionToCommaDelimitedString;
import static java.util.Arrays.asList;
import java.io.File;
import java.io.InputStream;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.fieldexpert.fbapi4j.common.Assert;
import com.fieldexpert.fbapi4j.common.Attachment;
import com.fieldexpert.fbapi4j.common.DateFormatUtil;
	}

	public String getTitle() {
		return (String) fields.get(Fbapi4j.S_TITLE);
	}

	public String getScoutDescription() {
		return (String) fields.get(Fbapi4j.S_SCOUT_DESCRIPTION);
	}

	public List<Attachment> getAttachments() {
		return Collections.unmodifiableList(this.attachments);
	}

	public List<Event> getEvents() {
		return Collections.unmodifiableList(this.events);
	}

	public void setArea(String area) {
		fields.put(Fbapi4j.S_AREA, area);
	}

	public void setParent(Case parent) {
		if (parent.getId() == null) {
			throw new Fbapi4jException("The parent case must be persisted first");
		}
		fields.put(Fbapi4j.IX_BUG_PARENT, parent.getId());
	}

	public void setTags(String... tags) {
// Path: src/com/fieldexpert/fbapi4j/common/StringUtil.java
// public static String collectionToCommaDelimitedString(Collection<?> col) {
// 	return collectionToDelimitedString(col, ",");
// }
// 
// Path: src/com/fieldexpert/fbapi4j/common/Assert.java
// public class Assert {
// 
// 	public static void notNull(Object object, String message) {
// 		if (object == null) {
// 			throw new IllegalArgumentException(message);
// 		}
// 	}
// 
// 	public static void notNull(Object object) {
// 		notNull(object, "[Assertion failed] - this argument is required; it must not be null");
// 	}
// }
// 
// Path: src/com/fieldexpert/fbapi4j/common/Attachment.java
// public class Attachment {
// 
// 	static {
// 		registerMimeDetector(ExtensionMimeDetector.class.getName());
// 		registerMimeDetector(MagicMimeMimeDetector.class.getName());
// 	}
// 
// 	public static String getType(File file) {
// 		Collection<?> types = getMimeTypes(file);
// 		return getMostSpecificMimeType(types).toString();
// 	}
// 
// 	public static String getType(InputStream is) {
// 		Collection<?> types = getMimeTypes(is);
// 		return getMostSpecificMimeType(types).toString();
// 	}
// 
// 	public static String getType(byte[] bytes) {
// 		Collection<?> types = getMimeTypes(bytes);
// 		return getMostSpecificMimeType(types).toString();
// 	}
// 
// 	private String filename;
// 	private String type;
// 	private InputStream content;
// 
// 	// not for you
// 	protected Attachment(String name) {
// 		this.filename = name;
// 	}
// 
// 	public Attachment(String filename, String type, byte[] content) {
// 		this(filename, type, new ByteArrayInputStream(content));
// 	}
// 
// 	public Attachment(String filename, String type, String content) {
// 		this(filename, type, content.getBytes(Charset.forName("UTF-8")));
// 	}
// 
// 	public Attachment(String filename, String type, InputStream content) {
// 		this.filename = filename;
// 		this.type = type;
// 		this.content = content;
// 	}
// 
// 	// can't chain this constructor call, because we need to try/catch
// 	public Attachment(File file) {
// 		Assert.notNull(file);
// 
// 		this.filename = file.getName();
// 		this.type = getType(file);
// 		try {
// 			this.content = new FileInputStream(file);
// 		} catch (Exception e) {
// 			throw new RuntimeException("Error reading file: '" + file.getName() + "'");
// 		}
// 	}
// 
// 	public InputStream getContent() {
// 		return content;
// 	}
// 
// 	public String getFilename() {
// 		return filename;
// 	}
// 
// 	public String getType() {
// 		return type;
// 	}
// }
// 
// Path: src/com/fieldexpert/fbapi4j/common/DateFormatUtil.java
// public class DateFormatUtil {
// 	public static final String FB_DATE = "yyyy-MM-dd'T'HH:mm:ss'Z'";
// 
// 	private static DateFormat getParser() {
// 		return new SimpleDateFormat(FB_DATE);
// 	}
// 
// 	public static String format(Date date) {
// 		return date == null ? null : getParser().format(date);
// 	}
// 
// 	public static Date parse(String date) {
// 		if (date == null || date.equals("")) {
// 			return null;
// 		}
// 		try {
// 			return getParser().parse(date);
// 		} catch (Exception e) {
// 			throw new RuntimeException(e);
// 		}
// 	}
// 
// }


// Path: src/com/fieldexpert/fbapi4j/Case.java
import static com.fieldexpert.fbapi4j.common.StringUtil.collectionToCommaDelimitedString;
import static java.util.Arrays.asList;
import java.io.File;
import java.io.InputStream;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.fieldexpert.fbapi4j.common.Assert;
import com.fieldexpert.fbapi4j.common.Attachment;
import com.fieldexpert.fbapi4j.common.DateFormatUtil;

	}

	public String getTitle() {
		return (String) fields.get(Fbapi4j.S_TITLE);
	}

	public String getScoutDescription() {
		return (String) fields.get(Fbapi4j.S_SCOUT_DESCRIPTION);
	}

	public List<Attachment> getAttachments() {
		return Collections.unmodifiableList(this.attachments);
	}

	public List<Event> getEvents() {
		return Collections.unmodifiableList(this.events);
	}

	public void setArea(String area) {
		fields.put(Fbapi4j.S_AREA, area);
	}

	public void setParent(Case parent) {
		if (parent.getId() == null) {
			throw new Fbapi4jException("The parent case must be persisted first");
		}
		fields.put(Fbapi4j.IX_BUG_PARENT, parent.getId());
	}

	public void setTags(String... tags) {
		fields.put(Fbapi4j.S_TAGS, collectionToCommaDelimitedString(asList(tags)));