@Test
public void should_delete_when_case_exists_and_synced_yet() throws Exception {

    long recordId = 123L;
    Case deleteCase = new Case(recordId);
    deleteCase.setSynced(true);
    when(caseDao.getCaseById(recordId)).thenReturn(deleteCase);
    Case actual = caseService.deleteByRecordId(recordId);
    verify(caseDao, times(1)).delete(deleteCase);
    verify(casePhotoDao, times(1)).deleteByCaseId(recordId);
    assertThat(actual, is(deleteCase));
}