getServerAddress() + "/form",
headers,
formParameters);
ObjectMapper objectMapper = new ObjectMapper();
FormObject returnedObject = objectMapper.readValue(response, FormObject.class);
// And assert that returned object has same values
assertEquals("tester", returnedObject.name);
assertEquals("test@email.com", returnedObject.getEmail());
assertEquals(593765, returnedObject.primInt);
assertEquals(593766, returnedObject.objInt.intValue());
assertEquals(-3957393, returnedObject.primLong);
assertEquals(-3957394, returnedObject.objLong.longValue());
assertEquals(78.12, returnedObject.primFloat, 0.001);
assertEquals(79.22, returnedObject.objFloat.floatValue(), 0.001);
assertEquals(694.56, returnedObject.primDouble, 0.001);
assertEquals(696.76, returnedObject.objDouble.doubleValue(), 0.001);
assertEquals(false, returnedObject.isPrimBoolean());
assertEquals(true, returnedObject.getObjBoolean().booleanValue());
assertEquals(111, returnedObject.getPrimByte());
assertEquals(112, returnedObject.getObjByte().byteValue());
assertEquals(32456, returnedObject.getPrimShort());
assertEquals(32455, returnedObject.getObjShort().shortValue());
assertEquals('Z', returnedObject.getPrimChar());
assertEquals('X', returnedObject.getObjChar().charValue());
}