### Question:
DatastoreFileLocationRepository implements FileLocationRepository { @Override public FileLocation save(FileLocation fileLocation) { log.info("Saving file location : {}", fileLocation); FileLocationEntity saved = fileLocationEntityRepository .save(fileLocationMapper.toEntity(fileLocation)); log.info("Fetch saved file location : {}", saved); return fileLocationMapper.toFileLocation(saved); }  @Override FileLocation findByFileID(String fileID); @Override FileLocation save(FileLocation fileLocation); @Override FileListResponse findAll(FileListRequest request);  }### Answer:
@Test void shouldSaveFileLocationAndReturnSavedEntity() { Date createdDate = new Date(); long entityId = RandomUtils.nextLong(); given(fileLocationEntityRepository.save(any(FileLocationEntity.class))) .willReturn(getFileLocationEntity(entityId, createdDate)); FileLocation fileLocation = fileLocationRepository.save(getFileLocation(createdDate)); verify(fileLocationEntityRepository).save(entityCaptor.capture()); then(fileLocation).isEqualTo(getFileLocation(createdDate)); then(entityCaptor.getValue()).isEqualTo(getFileLocationEntity(null, createdDate)); }