killServers(hotRodServer);
}
@Test
public void testPutAndGet() throws Exception {
User user = new User();
user.setId(1);
user.setName("Tom");
user.setSurname("Cat");
user.setGender(User.Gender.MALE);
user.setAccountIds(Collections.singletonList(12));
Address address = new Address();
address.setStreet("Dark Alley");
address.setPostCode("1234");
user.setAddresses(Collections.singletonList(address));
remoteCache.put(1, user);
User fromCache = remoteCache.get(1);
assertEquals(1, fromCache.getId());
assertEquals("Tom", fromCache.getName());
assertEquals("Cat", fromCache.getSurname());
assertEquals(User.Gender.MALE, fromCache.getGender());
assertNotNull(fromCache.getAccountIds());
assertEquals(1, fromCache.getAccountIds().size());
assertEquals(12, fromCache.getAccountIds().get(0).intValue());
assertNotNull(fromCache.getAddresses());
assertEquals(1, fromCache.getAddresses().size());
assertEquals("Dark Alley", fromCache.getAddresses().get(0).getStreet());
assertEquals("1234", fromCache.getAddresses().get(0).getPostCode());
}