### Question:
WorkLogService implements WorkLogServiceI { @Override public WorkLog deleteWorkLog(Long workLogId) throws BaseException { WorkLog workLog = workLogRepository.findWorkLogById(workLogId); if (workLog == null) { throw new WorkLogDontExistException("Deleting work log dont exists"); } return workLogRepository.deleteWorkLog(workLog); } @Inject  WorkLogService(WorkLogRepositoryI workLogRepository, WorkerRepositoryI workerRepository); @Override WorkLog logWork(WorkLog workLog); @Override WorkLog editWorkLog(Long id, WorkLog workLog); @Override WorkLog deleteWorkLog(Long workLogId); @Override List<WorkLog> reportWorkerWork(Worker worker); @Override WorkLog findWorkLogById(Long id);  }### Answer:
@Test public void deleteWorkLog_Success() throws BaseException { WorkLog existingWorkLog = getWorkLogRepositoryStub().getWorkLogList().stream().findAny().get(); WorkLog result = workLogService.deleteWorkLog(1l); assertEquals(existingWorkLog.getWorkLogId(), result.getWorkLogId()); assertEquals(existingWorkLog.getDescription(), result.getDescription()); assertEquals(existingWorkLog.getStartDate(), result.getStartDate()); assertEquals(existingWorkLog.getTimeSpentInSeconds(), result.getTimeSpentInSeconds()); assertEquals(existingWorkLog.getAssociatedWorker().getLogin(), result.getAssociatedWorker().getLogin()); assertTrue(getWorkLogRepositoryStub().getWorkLogList().isEmpty()); }
@Test(expected = WorkLogDontExistException.class) public void deleteWorkLog_WorkLogDontExist() throws BaseException { workLogService.deleteWorkLog(2l); }