### Question:
FileSystemCallbackHandlerDao implements CallbackHandlerDao { @Override public void remove(String handlerId) { try { Files.delete(Paths.get(getAbsolutePath(fileName(handlerId)))); } catch (Exception e) { log.error("Can not remove handler {} due to: {}", handlerId, e.getMessage(), e); throw new DlabException("Can not remove handler " + handlerId + " due to: " + e.getMessage()); } }  @Override void upsert(PersistentFileHandler handlerCallback); @Override List<PersistentFileHandler> findAll(); @Override void remove(String handlerId);  }### Answer:
@Test public void remove() throws IOException { final File handler = getHandlerFile("test1.json"); handler.createNewFile(); final String handlersFolder = getHandlersFolder(); when(configuration.getHandlerDirectory()).thenReturn(handlersFolder); fileSystemCallbackHandlerDao.remove("test1"); assertFalse(handler.exists()); verify(configuration).getHandlerDirectory(); verifyNoMoreInteractions(configuration, dao, mapper); }
@Test public void removeWithException() throws IOException { final String handlersFolder = getHandlersFolder(); when(configuration.getHandlerDirectory()).thenReturn(handlersFolder); expectedException.expect(DlabException.class); fileSystemCallbackHandlerDao.remove("test1.json"); }