### Question:
CustomGoalServiceImpl implements CustomGoalService { @Transactional @Override public List<Long> bulkDelete(String ids) { List<Long> arrayIds = Arrays .stream(ids.split(",")) .map(Long::valueOf) .collect(Collectors.toList()); List<Long> deleted = new ArrayList<>(); for (Long id : arrayIds) { deleted.add(delete(id)); } return deleted; }  @Transactional @Override List<CustomGoalResponseDto> save(BulkSaveCustomGoalDto bulkSave, User user); @Transactional @Override List<CustomGoalResponseDto> findAll(); @Transactional @Override CustomGoalResponseDto findById(Long id); @Transactional @Override List<CustomGoalResponseDto> updateBulk(BulkCustomGoalDto bulkCustomGoalDto); @Transactional @Override List<CustomGoalResponseDto> findAllByUser(Long userId); @Transactional @Override List<Long> bulkDelete(String ids);  }### Answer:
@Test(expected = NotFoundException.class) public void bulkDeleteWithNonExistentIdTest() { doThrow(new EmptyResultDataAccessException(1)).when(customGoalRepo).deleteById(1L); customGoalService.bulkDelete("1"); }
@Test public void bulkDeleteWithExistentIdTest() { doNothing().when(customGoalRepo).deleteById(anyLong()); List<Long> bulkDeleteResult = customGoalService.bulkDelete("1,2,3"); ArrayList<Long> expectedResult = new ArrayList<>(); expectedResult.add(1L); expectedResult.add(2L); expectedResult.add(3L); assertEquals(expectedResult, bulkDeleteResult); }