// Path: src/main/java/com/sonoport/freesound/response/Pack.java
// public class Pack {
// 
// 	/** The unique identifier of this pack. */
// 	private int id;
// 
// 	/** The URI for this pack on the Freesound website. */
// 	private String url;
// 
// 	/** The description the user gave to the pack (if any). */
// 	private String description;
// 
// 	/** The date when the pack was created. */
// 	private Date created;
// 
// 	/** The name user gave to the pack. */
// 	private String name;
// 
// 	/** Username of the creator of the pack. */
// 	private String username;
// 
// 	/** The number of sounds in the pack. */
// 	private int numberOfSounds;
// 
// 	/** The URI for a list of sounds in the pack. */
// 	private String soundsURI;
// 
// 	/** The number of times this pack has been downloaded. */
// 	private int numberOfDownloads;
// 
// 	/**
// 	 * @return the id
// 	 */
// 	public int getId() {
// 		return id;
// 	}
// 
// 	/**
// 	 * @param id the id to set
// 	 */
// 	public void setId(final int id) {
// 		this.id = id;
// 	}
// 
// 	/**
// 	 * @return the url
// 	 */
// 	public String getUrl() {
// 		return url;
// 	}
// 
// 	/**
// 	 * @param url the url to set
// 	 */
// 	public void setUrl(final String url) {
// 		this.url = url;
// 	}
// 
// 	/**
// 	 * @return the description
// 	 */
// 	public String getDescription() {
// 		return description;
// 	}
// 
// 	/**
// 	 * @param description the description to set
// 	 */
// 	public void setDescription(final String description) {
// 		this.description = description;
// 	}
// 
// 	/**
// 	 * @return the created
// 	 */
// 	public Date getCreated() {
// 		return created;
// 	}
// 
// 	/**
// 	 * @param created the created to set
// 	 */
// 	public void setCreated(final Date created) {
// 		this.created = created;
// 	}
// 
// 	/**
// 	 * @return the name
// 	 */
// 	public String getName() {
// 		return name;
// 	}
// 
// 	/**
// 	 * @param name the name to set
// 	 */
// 	public void setName(final String name) {
// 		this.name = name;
// 	}
// 
// 	/**
// 	 * @return the username
// 	 */
// 	public String getUsername() {
// 		return username;
// 	}
// 
// 	/**
// 	 * @param username the username to set
// 	 */
// 	public void setUsername(final String username) {
// 		this.username = username;
// 	}
// 
// 	/**
// 	 * @return the numberOfSounds
// 	 */
// 	public int getNumberOfSounds() {
// 		return numberOfSounds;
// 	}
// 
// 	/**
// 	 * @param numberOfSounds the numberOfSounds to set
// 	 */
// 	public void setNumberOfSounds(final int numberOfSounds) {
// 		this.numberOfSounds = numberOfSounds;
// 	}
// 
// 	/**
// 	 * @return the numberOfDownloads
// 	 */
// 	public int getNumberOfDownloads() {
// 		return numberOfDownloads;
// 	}
// 
// 	/**
// 	 * @param numberOfDownloads the numberOfDownloads to set
// 	 */
// 	public void setNumberOfDownloads(final int numberOfDownloads) {
// 		this.numberOfDownloads = numberOfDownloads;
// 	}
// 
// 	/**
// 	 * @return the soundsURI
// 	 */
// 	public String getSoundsURI() {
// 		return soundsURI;
// 	}
// 
// 	/**
// 	 * @param soundsURI the soundsURI to set
// 	 */
// 	public void setSoundsURI(final String soundsURI) {
// 		this.soundsURI = soundsURI;
// 	}
// 
// }


import static org.junit.Assert.assertEquals;
import java.util.Date;
import org.json.JSONObject;
import org.junit.Test;
import com.sonoport.freesound.response.Pack;
package com.sonoport.freesound.response.mapping;





/**
 * Unit tests to ensure the correct operation of {@link PackMapper}. Test data is located as
 * <code>/src/test/resources/pack.json</code>.
 */
public class PackMapperTest extends MapperTest {

	/** Id of the pack. */
	private static final int ID = 15292;

	/** URL of the pack. */
	private static final String URL = "http://www.freesound.org/people/clarinet_pablo_proj/packs/15292/";

	/** Description of the pack. */
	private static final String DESCRIPTION = "Pack description";

	/** Date the pack was created. */
	private static final Date DATE_CREATED = new Date(1410973300000L);

	/** Name of the pack. */
	private static final String PACK_NAME = "Pablo_Project clarinet overall quality of single note";

	/** User name of the pack creator. */
	private static final String USERNAME = "clarinet_pablo_proj";

	/** Number of sounds in the pack. */
	private static final int NUMBER_OF_SOUNDS = 794;

	/** URL link to sounds in pack. */
	private static final String SOUNDS_URI = "http://www.freesound.org/apiv2/packs/15292/sounds/";

	/** Number of times the pack has been downloaded. */
	private static final int NUMBER_OF_DOWNLOADS = 12;

	/** Instance of {@link PackMapper} to use in tests. */
	private final PackMapper packMapper = new PackMapper();

	/**
	 * Test that {@link PackMapper} correctly maps the JSON representation of a sound pack into a {@link Pack} DTO.
	 *
	 * @throws Exception Any exceptions thrown in test
	 */
	@Test
	public void parsePackRecord() throws Exception {
		final JSONObject packJSON = readJSONFile("/pack.json");

// Path: src/main/java/com/sonoport/freesound/response/Pack.java
// public class Pack {
// 
// 	/** The unique identifier of this pack. */
// 	private int id;
// 
// 	/** The URI for this pack on the Freesound website. */
// 	private String url;
// 
// 	/** The description the user gave to the pack (if any). */
// 	private String description;
// 
// 	/** The date when the pack was created. */
// 	private Date created;
// 
// 	/** The name user gave to the pack. */
// 	private String name;
// 
// 	/** Username of the creator of the pack. */
// 	private String username;
// 
// 	/** The number of sounds in the pack. */
// 	private int numberOfSounds;
// 
// 	/** The URI for a list of sounds in the pack. */
// 	private String soundsURI;
// 
// 	/** The number of times this pack has been downloaded. */
// 	private int numberOfDownloads;
// 
// 	/**
// 	 * @return the id
// 	 */
// 	public int getId() {
// 		return id;
// 	}
// 
// 	/**
// 	 * @param id the id to set
// 	 */
// 	public void setId(final int id) {
// 		this.id = id;
// 	}
// 
// 	/**
// 	 * @return the url
// 	 */
// 	public String getUrl() {
// 		return url;
// 	}
// 
// 	/**
// 	 * @param url the url to set
// 	 */
// 	public void setUrl(final String url) {
// 		this.url = url;
// 	}
// 
// 	/**
// 	 * @return the description
// 	 */
// 	public String getDescription() {
// 		return description;
// 	}
// 
// 	/**
// 	 * @param description the description to set
// 	 */
// 	public void setDescription(final String description) {
// 		this.description = description;
// 	}
// 
// 	/**
// 	 * @return the created
// 	 */
// 	public Date getCreated() {
// 		return created;
// 	}
// 
// 	/**
// 	 * @param created the created to set
// 	 */
// 	public void setCreated(final Date created) {
// 		this.created = created;
// 	}
// 
// 	/**
// 	 * @return the name
// 	 */
// 	public String getName() {
// 		return name;
// 	}
// 
// 	/**
// 	 * @param name the name to set
// 	 */
// 	public void setName(final String name) {
// 		this.name = name;
// 	}
// 
// 	/**
// 	 * @return the username
// 	 */
// 	public String getUsername() {
// 		return username;
// 	}
// 
// 	/**
// 	 * @param username the username to set
// 	 */
// 	public void setUsername(final String username) {
// 		this.username = username;
// 	}
// 
// 	/**
// 	 * @return the numberOfSounds
// 	 */
// 	public int getNumberOfSounds() {
// 		return numberOfSounds;
// 	}
// 
// 	/**
// 	 * @param numberOfSounds the numberOfSounds to set
// 	 */
// 	public void setNumberOfSounds(final int numberOfSounds) {
// 		this.numberOfSounds = numberOfSounds;
// 	}
// 
// 	/**
// 	 * @return the numberOfDownloads
// 	 */
// 	public int getNumberOfDownloads() {
// 		return numberOfDownloads;
// 	}
// 
// 	/**
// 	 * @param numberOfDownloads the numberOfDownloads to set
// 	 */
// 	public void setNumberOfDownloads(final int numberOfDownloads) {
// 		this.numberOfDownloads = numberOfDownloads;
// 	}
// 
// 	/**
// 	 * @return the soundsURI
// 	 */
// 	public String getSoundsURI() {
// 		return soundsURI;
// 	}
// 
// 	/**
// 	 * @param soundsURI the soundsURI to set
// 	 */
// 	public void setSoundsURI(final String soundsURI) {
// 		this.soundsURI = soundsURI;
// 	}
// 
// }


// Path: src/test/java/com/sonoport/freesound/response/mapping/PackMapperTest.java
import static org.junit.Assert.assertEquals;
import java.util.Date;
import org.json.JSONObject;
import org.junit.Test;
import com.sonoport.freesound.response.Pack;

package com.sonoport.freesound.response.mapping;





/**
 * Unit tests to ensure the correct operation of {@link PackMapper}. Test data is located as
 * <code>/src/test/resources/pack.json</code>.
 */
public class PackMapperTest extends MapperTest {

	/** Id of the pack. */
	private static final int ID = 15292;

	/** URL of the pack. */
	private static final String URL = "http://www.freesound.org/people/clarinet_pablo_proj/packs/15292/";

	/** Description of the pack. */
	private static final String DESCRIPTION = "Pack description";

	/** Date the pack was created. */
	private static final Date DATE_CREATED = new Date(1410973300000L);

	/** Name of the pack. */
	private static final String PACK_NAME = "Pablo_Project clarinet overall quality of single note";

	/** User name of the pack creator. */
	private static final String USERNAME = "clarinet_pablo_proj";

	/** Number of sounds in the pack. */
	private static final int NUMBER_OF_SOUNDS = 794;

	/** URL link to sounds in pack. */
	private static final String SOUNDS_URI = "http://www.freesound.org/apiv2/packs/15292/sounds/";

	/** Number of times the pack has been downloaded. */
	private static final int NUMBER_OF_DOWNLOADS = 12;

	/** Instance of {@link PackMapper} to use in tests. */
	private final PackMapper packMapper = new PackMapper();

	/**
	 * Test that {@link PackMapper} correctly maps the JSON representation of a sound pack into a {@link Pack} DTO.
	 *
	 * @throws Exception Any exceptions thrown in test
	 */
	@Test
	public void parsePackRecord() throws Exception {
		final JSONObject packJSON = readJSONFile("/pack.json");

		final Pack pack = packMapper.map(packJSON);