@Test public void testTransform() { Assert.assertEquals(0, sut.transform(null).size()); SharedResourceDTO dto = new SharedResourceDTO(); dto.setLikerPersonIds(null); Assert.assertEquals(0, sut.transform(dto).size()); ArrayList<Long> peopleIds = new ArrayList<Long>(); dto.setLikerPersonIds(peopleIds); Assert.assertSame(peopleIds, sut.transform(dto)); }
@Override public List<Long> transform(final SharedResourceDTO inSharedResource) { if (inSharedResource == null || inSharedResource.getLikerPersonIds() == null) { return new ArrayList<Long>(); } return inSharedResource.getLikerPersonIds(); }
SharedResourceDTOToLikerPeopleIdsTransformer implements Transformer<SharedResourceDTO, List<Long>> { @Override public List<Long> transform(final SharedResourceDTO inSharedResource) { if (inSharedResource == null || inSharedResource.getLikerPersonIds() == null) { return new ArrayList<Long>(); } return inSharedResource.getLikerPersonIds(); } }
SharedResourceDTOToLikerPeopleIdsTransformer implements Transformer<SharedResourceDTO, List<Long>> { @Override public List<Long> transform(final SharedResourceDTO inSharedResource) { if (inSharedResource == null || inSharedResource.getLikerPersonIds() == null) { return new ArrayList<Long>(); } return inSharedResource.getLikerPersonIds(); }  }
SharedResourceDTOToLikerPeopleIdsTransformer implements Transformer<SharedResourceDTO, List<Long>> { @Override public List<Long> transform(final SharedResourceDTO inSharedResource) { if (inSharedResource == null || inSharedResource.getLikerPersonIds() == null) { return new ArrayList<Long>(); } return inSharedResource.getLikerPersonIds(); }  @Override List<Long> transform(final SharedResourceDTO inSharedResource); }
SharedResourceDTOToLikerPeopleIdsTransformer implements Transformer<SharedResourceDTO, List<Long>> { @Override public List<Long> transform(final SharedResourceDTO inSharedResource) { if (inSharedResource == null || inSharedResource.getLikerPersonIds() == null) { return new ArrayList<Long>(); } return inSharedResource.getLikerPersonIds(); }  @Override List<Long> transform(final SharedResourceDTO inSharedResource);  }