@Test void testUpdate() { when(entityMappingRepository.upsert(entityMappings)).thenReturn(entityMappingEntities); List<Entity> result = mappingTargetRepository.upsert(mappingTargets); assertEquals(result.size(), mappingTargetEntities.size()); for (int i = 0; i < mappingTargetEntities.size(); ++i) { assertTrue(EntityUtils.equals(mappingTargetEntities.get(i), result.get(i))); } }
@Override public List<Entity> upsert(Collection<MappingTarget> collection) { return collection.stream().map(this::upsert).collect(Collectors.toList()); }
MappingTargetRepositoryImpl implements MappingTargetRepository { @Override public List<Entity> upsert(Collection<MappingTarget> collection) { return collection.stream().map(this::upsert).collect(Collectors.toList()); } }
MappingTargetRepositoryImpl implements MappingTargetRepository { @Override public List<Entity> upsert(Collection<MappingTarget> collection) { return collection.stream().map(this::upsert).collect(Collectors.toList()); } MappingTargetRepositoryImpl(EntityMappingRepository entityMappingRepository); }
MappingTargetRepositoryImpl implements MappingTargetRepository { @Override public List<Entity> upsert(Collection<MappingTarget> collection) { return collection.stream().map(this::upsert).collect(Collectors.toList()); } MappingTargetRepositoryImpl(EntityMappingRepository entityMappingRepository); @Override List<Entity> upsert(Collection<MappingTarget> collection); @Override List<MappingTarget> toMappingTargets(List<Entity> mappingTargetEntities); }
MappingTargetRepositoryImpl implements MappingTargetRepository { @Override public List<Entity> upsert(Collection<MappingTarget> collection) { return collection.stream().map(this::upsert).collect(Collectors.toList()); } MappingTargetRepositoryImpl(EntityMappingRepository entityMappingRepository); @Override List<Entity> upsert(Collection<MappingTarget> collection); @Override List<MappingTarget> toMappingTargets(List<Entity> mappingTargetEntities);  }