// Path: src/test/java/com/greensopinion/swagger/jaxrsgen/mock/PetService.java
// @Path("pet")
// @Api(value = "/pet", description = "Operations about pets")
// @Produces(MediaType.APPLICATION_JSON)
// public class PetService {
// 
// 	@GET
// 	@ApiOperation(value = "List all pets", notes = "List all pets. Results are paginated.", response = PetListing.class)
// 	public PetListing list(@QueryParam("start") @DefaultValue("0") int start,
// 			@QueryParam("count") @DefaultValue("50") int count,
// 			@QueryParam("superSecretParam") @ApiParam(hidden = true) String superSecretParam) {
// 		return null;
// 	}
// 
// 	@GET
// 	@Path("{id}")
// 	@ApiOperation(value = "Retrieve pet by id", notes = "Retrieves a pet by it's id.", response = Pet.class)
// 	@ApiResponses(value = { @ApiResponse(code = 404, message = "Pet not found", response = ServerError.class) })
// 	public Pet retrievePet(@PathParam("id") long id) {
// 		return null;
// 	}
// 
// 	@GET
// 	@Path("{id}/properties")
// 	@ApiOperation(value = "Retrieve pet by id", notes = "Retrieves a pet by it's id with specified properties.", response = Pet.class)
// 	@ApiResponses(value = { @ApiResponse(code = 404, message = "Pet not found", response = ServerError.class) })
// 	public Map<String, Object> retrievePet(@PathParam("id") long id,
// 			@QueryParam("properties") List<String> properties) {
// 		return null;
// 	}
// 
// 	@DELETE
// 	@Path("/{id}")
// 	@ApiOperation(value = "Delete pet by id", notes = "Deletes a pet by it's id.")
// 	@ApiResponses(value = { @ApiResponse(code = 404, message = "Pet not found", response = ServerError.class) })
// 	public void deletePet(@PathParam("id") long id) {
// 	}
// 
// 	@PUT
// 	@ApiOperation(value = "Creates a new pet", notes = "Creates a new pet with the given name.", response = PetHandle.class)
// 	public PetHandle createPet(PetValues petValues) {
// 		return null;
// 	}
// 
// 	@POST
// 	@Path("{id}")
// 	@Produces(MediaType.APPLICATION_JSON)
// 	@ApiOperation(value = "Updates a pet", notes = "Updates an existing pet with the provided details.")
// 	@ApiResponses(value = { @ApiResponse(code = 404, message = "Pet not found", response = ServerError.class) })
// 	public void updatePet(Pet pet, @PathParam("id") long id) {
// 	}
// 
// 	@POST
// 	@Path("{id}/photo")
// 	@Consumes(MediaType.MULTIPART_FORM_DATA)
// 	@ApiOperation(value = "Provides a pet photo", notes = "Updates an existing pet entry with a new photo of the pet.")
// 	@ApiResponses(value = { @ApiResponse(code = 404, message = "Pet not found", response = ServerError.class) })
// 	public void postPetPhoto(@PathParam("id") long id, MultiPart multiPart) {
// 	}
// }
// 
// Path: src/test/java/com/greensopinion/swagger/jaxrsgen/mock/ServiceWithBodyHavingGenericTypeParameter.java
// @Path("/bodyWithGenericTypeParameter")
// public class ServiceWithBodyHavingGenericTypeParameter {
// 
// 	@POST
// 	public void get(List<Pet> pets) {
// 	}
// }
// 
// Path: src/test/java/com/greensopinion/swagger/jaxrsgen/mock/ServiceWithResponseReturnType.java
// @Path("/pets")
// public class ServiceWithResponseReturnType {
// 
// 	@GET
// 	@ApiOperation(value = "List all pets", notes = "List all pets. Results are paginated.", response = PetListing.class)
// 	public Response listPets() {
// 		throw new UnsupportedOperationException();
// 	}
// }


import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import org.junit.Test;
import com.google.gson.GsonBuilder;
import com.greensopinion.swagger.jaxrsgen.mock.PetService;
import com.greensopinion.swagger.jaxrsgen.mock.ServiceWithBodyHavingGenericTypeParameter;
import com.greensopinion.swagger.jaxrsgen.mock.ServiceWithResponseReturnType;
				.description("Operations about pets")
				.version("1.0.1")
				.methods(PetService.class)
				.create();
		assertNotNull(service);

		String json = new GsonBuilder().disableHtmlEscaping().setPrettyPrinting().create().toJson(service);
		assertEquals(TestResources.read(ServiceTest.class, "serializedForm.json"), json);
	}

	@Test
	public void serviceWithResponseReturnType() {
		Service service = Service.builder()
				.basePath("/api/latest")
				.path("/apath")
				.version("1.0.1")
				.methods(ServiceWithResponseReturnType.class)
				.create();
		assertNotNull(service);

		String json = new GsonBuilder().disableHtmlEscaping().setPrettyPrinting().create().toJson(service);
		assertEquals(TestResources.read(ServiceTest.class, "serviceWithResponseReturnType.json"), json);
	}

	@Test
	public void serviceWithBodyHavingGenericTypeParameter() {
		Service service = Service.builder()
				.basePath("/api/latest")
				.path("/apath")
				.version("1.0.1")
// Path: src/test/java/com/greensopinion/swagger/jaxrsgen/mock/PetService.java
// @Path("pet")
// @Api(value = "/pet", description = "Operations about pets")
// @Produces(MediaType.APPLICATION_JSON)
// public class PetService {
// 
// 	@GET
// 	@ApiOperation(value = "List all pets", notes = "List all pets. Results are paginated.", response = PetListing.class)
// 	public PetListing list(@QueryParam("start") @DefaultValue("0") int start,
// 			@QueryParam("count") @DefaultValue("50") int count,
// 			@QueryParam("superSecretParam") @ApiParam(hidden = true) String superSecretParam) {
// 		return null;
// 	}
// 
// 	@GET
// 	@Path("{id}")
// 	@ApiOperation(value = "Retrieve pet by id", notes = "Retrieves a pet by it's id.", response = Pet.class)
// 	@ApiResponses(value = { @ApiResponse(code = 404, message = "Pet not found", response = ServerError.class) })
// 	public Pet retrievePet(@PathParam("id") long id) {
// 		return null;
// 	}
// 
// 	@GET
// 	@Path("{id}/properties")
// 	@ApiOperation(value = "Retrieve pet by id", notes = "Retrieves a pet by it's id with specified properties.", response = Pet.class)
// 	@ApiResponses(value = { @ApiResponse(code = 404, message = "Pet not found", response = ServerError.class) })
// 	public Map<String, Object> retrievePet(@PathParam("id") long id,
// 			@QueryParam("properties") List<String> properties) {
// 		return null;
// 	}
// 
// 	@DELETE
// 	@Path("/{id}")
// 	@ApiOperation(value = "Delete pet by id", notes = "Deletes a pet by it's id.")
// 	@ApiResponses(value = { @ApiResponse(code = 404, message = "Pet not found", response = ServerError.class) })
// 	public void deletePet(@PathParam("id") long id) {
// 	}
// 
// 	@PUT
// 	@ApiOperation(value = "Creates a new pet", notes = "Creates a new pet with the given name.", response = PetHandle.class)
// 	public PetHandle createPet(PetValues petValues) {
// 		return null;
// 	}
// 
// 	@POST
// 	@Path("{id}")
// 	@Produces(MediaType.APPLICATION_JSON)
// 	@ApiOperation(value = "Updates a pet", notes = "Updates an existing pet with the provided details.")
// 	@ApiResponses(value = { @ApiResponse(code = 404, message = "Pet not found", response = ServerError.class) })
// 	public void updatePet(Pet pet, @PathParam("id") long id) {
// 	}
// 
// 	@POST
// 	@Path("{id}/photo")
// 	@Consumes(MediaType.MULTIPART_FORM_DATA)
// 	@ApiOperation(value = "Provides a pet photo", notes = "Updates an existing pet entry with a new photo of the pet.")
// 	@ApiResponses(value = { @ApiResponse(code = 404, message = "Pet not found", response = ServerError.class) })
// 	public void postPetPhoto(@PathParam("id") long id, MultiPart multiPart) {
// 	}
// }
// 
// Path: src/test/java/com/greensopinion/swagger/jaxrsgen/mock/ServiceWithBodyHavingGenericTypeParameter.java
// @Path("/bodyWithGenericTypeParameter")
// public class ServiceWithBodyHavingGenericTypeParameter {
// 
// 	@POST
// 	public void get(List<Pet> pets) {
// 	}
// }
// 
// Path: src/test/java/com/greensopinion/swagger/jaxrsgen/mock/ServiceWithResponseReturnType.java
// @Path("/pets")
// public class ServiceWithResponseReturnType {
// 
// 	@GET
// 	@ApiOperation(value = "List all pets", notes = "List all pets. Results are paginated.", response = PetListing.class)
// 	public Response listPets() {
// 		throw new UnsupportedOperationException();
// 	}
// }


// Path: src/test/java/com/greensopinion/swagger/jaxrsgen/model/ServiceTest.java
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import org.junit.Test;
import com.google.gson.GsonBuilder;
import com.greensopinion.swagger.jaxrsgen.mock.PetService;
import com.greensopinion.swagger.jaxrsgen.mock.ServiceWithBodyHavingGenericTypeParameter;
import com.greensopinion.swagger.jaxrsgen.mock.ServiceWithResponseReturnType;

				.description("Operations about pets")
				.version("1.0.1")
				.methods(PetService.class)
				.create();
		assertNotNull(service);

		String json = new GsonBuilder().disableHtmlEscaping().setPrettyPrinting().create().toJson(service);
		assertEquals(TestResources.read(ServiceTest.class, "serializedForm.json"), json);
	}

	@Test
	public void serviceWithResponseReturnType() {
		Service service = Service.builder()
				.basePath("/api/latest")
				.path("/apath")
				.version("1.0.1")
				.methods(ServiceWithResponseReturnType.class)
				.create();
		assertNotNull(service);

		String json = new GsonBuilder().disableHtmlEscaping().setPrettyPrinting().create().toJson(service);
		assertEquals(TestResources.read(ServiceTest.class, "serviceWithResponseReturnType.json"), json);
	}

	@Test
	public void serviceWithBodyHavingGenericTypeParameter() {
		Service service = Service.builder()
				.basePath("/api/latest")
				.path("/apath")
				.version("1.0.1")
				.methods(ServiceWithBodyHavingGenericTypeParameter.class)