@Test void testToMappingTargets() { when(dataService.getEntityType("target")).thenReturn(targetEntityType); when(entityMappingRepository.toEntityMappings(entityMappingEntities)) .thenReturn(entityMappings); when(dataService.hasRepository("target")).thenReturn(true); assertEquals(mappingTargets, mappingTargetRepository.toMappingTargets(mappingTargetEntities)); }
@Override public List<MappingTarget> toMappingTargets(List<Entity> mappingTargetEntities) { return mappingTargetEntities.stream().map(this::toMappingTarget).collect(Collectors.toList()); }
MappingTargetRepositoryImpl implements MappingTargetRepository { @Override public List<MappingTarget> toMappingTargets(List<Entity> mappingTargetEntities) { return mappingTargetEntities.stream().map(this::toMappingTarget).collect(Collectors.toList()); } }
MappingTargetRepositoryImpl implements MappingTargetRepository { @Override public List<MappingTarget> toMappingTargets(List<Entity> mappingTargetEntities) { return mappingTargetEntities.stream().map(this::toMappingTarget).collect(Collectors.toList()); } MappingTargetRepositoryImpl(EntityMappingRepository entityMappingRepository); }
MappingTargetRepositoryImpl implements MappingTargetRepository { @Override public List<MappingTarget> toMappingTargets(List<Entity> mappingTargetEntities) { return mappingTargetEntities.stream().map(this::toMappingTarget).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<MappingTarget> toMappingTargets(List<Entity> mappingTargetEntities) { return mappingTargetEntities.stream().map(this::toMappingTarget).collect(Collectors.toList()); } MappingTargetRepositoryImpl(EntityMappingRepository entityMappingRepository); @Override List<Entity> upsert(Collection<MappingTarget> collection); @Override List<MappingTarget> toMappingTargets(List<Entity> mappingTargetEntities);  }