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