// Path: examples/microservice/dao-api/src/main/java/org/osgi/enroute/examples/microservice/dao/dto/AddressDTO.java
// public class AddressDTO {
// 
// 	public long personId;
// 	public String emailAddress;
// 	public String city;
// 	public String country;
// }
// 
// Path: examples/microservice/dao-api/src/main/java/org/osgi/enroute/examples/microservice/dao/dto/PersonDTO.java
// public class PersonDTO {
// 
// 	public long personId;
// 	public String firstName;
// 	public String lastName;
// 
// 	public List<AddressDTO> addresses = new ArrayList<>();
// }


import static org.junit.Assert.assertEquals;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.MediaType;
import org.junit.Test;
import org.osgi.enroute.examples.microservice.dao.dto.AddressDTO;
import org.osgi.enroute.examples.microservice.dao.dto.PersonDTO;
package org.osgi.enroute.examples.microservice.rest;





public class JsonConverterTest {
    
    @Test
    public void testJSONSerialization() throws WebApplicationException, IOException {
        
        JsonpConvertingPlugin<PersonDTO> plugin = new JsonpConvertingPlugin<>();
        
        
        PersonDTO dto = new PersonDTO();
        dto.firstName = "Tim";
        dto.lastName = "Ward";
        dto.personId = 1234;
        
// Path: examples/microservice/dao-api/src/main/java/org/osgi/enroute/examples/microservice/dao/dto/AddressDTO.java
// public class AddressDTO {
// 
// 	public long personId;
// 	public String emailAddress;
// 	public String city;
// 	public String country;
// }
// 
// Path: examples/microservice/dao-api/src/main/java/org/osgi/enroute/examples/microservice/dao/dto/PersonDTO.java
// public class PersonDTO {
// 
// 	public long personId;
// 	public String firstName;
// 	public String lastName;
// 
// 	public List<AddressDTO> addresses = new ArrayList<>();
// }


// Path: examples/microservice/rest-service/src/test/java/org/osgi/enroute/examples/microservice/rest/JsonConverterTest.java
import static org.junit.Assert.assertEquals;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.MediaType;
import org.junit.Test;
import org.osgi.enroute.examples.microservice.dao.dto.AddressDTO;
import org.osgi.enroute.examples.microservice.dao.dto.PersonDTO;

package org.osgi.enroute.examples.microservice.rest;





public class JsonConverterTest {
    
    @Test
    public void testJSONSerialization() throws WebApplicationException, IOException {
        
        JsonpConvertingPlugin<PersonDTO> plugin = new JsonpConvertingPlugin<>();
        
        
        PersonDTO dto = new PersonDTO();
        dto.firstName = "Tim";
        dto.lastName = "Ward";
        dto.personId = 1234;
        
        AddressDTO dto2 = new AddressDTO();