### Question:
MapAttachmentService extends SingleAttachmentService implements ISingleAttachmentService { protected void removeAttachmentInfoFromMaps(MapRepository mapRepository, String mongoId) { final List<Map> maps = mapRepository.findAllByAttachmentMongoId(mongoId); maps.stream().forEach(map -> { map.setAttachmentFileName(null); map.setAttachmentMongoId(null); }); mapRepository.save(maps); } MapAttachmentService(@NonNull final FileRepository fileRepository,
                                @NonNull final MapRepository mapRepository); void deleteFile(@NonNull final String fileId);  }### Answer:
@Test public void shouldRemoveAttachmentInfoFromMapsSetNullAsMongoId() { tested.removeAttachmentInfoFromMaps(mapRepository, MONGO_ID); maps.forEach(map -> Assert.assertNull(map.getAttachmentMongoId())); }
@Test public void shouldRemoveAttachmentInfoFromMapsSetNullAsFileName() { tested.removeAttachmentInfoFromMaps(mapRepository, MONGO_ID); maps.forEach(map -> Assert.assertNull(map.getAttachmentFileName())); }
@Test public void shouldNotRemoveAttachmentInfoFromMaps() { tested.removeAttachmentInfoFromMaps(mapRepository, "DIFFERENT_MONGO_ID"); maps.forEach(map -> Assert.assertNotNull(map.getAttachmentFileName())); maps.forEach(map -> Assert.assertNotNull(map.getAttachmentMongoId())); }