@Test public void testShouldSaveDraft() { when(draftRepository.saveDraft(saveDraftRequest())).thenReturn(1L); final long id = draftService.save(saveDraftRequest()); assertEquals(1L, id); }
public long save(NewDraft newDraft) { return draftRepository.saveDraft(newDraft); }
DraftService { public long save(NewDraft newDraft) { return draftRepository.saveDraft(newDraft); } }
DraftService { public long save(NewDraft newDraft) { return draftRepository.saveDraft(newDraft); } DraftService(DraftRepository draftRepository); }
DraftService { public long save(NewDraft newDraft) { return draftRepository.saveDraft(newDraft); } DraftService(DraftRepository draftRepository); long save(NewDraft newDraft); DraftResult getDrafts(DraftSearchCriteria searchCriteria); void update(UpdateDraft updateDraft); void delete(List<Long> draftIdList); void delete(long draftId); }
DraftService { public long save(NewDraft newDraft) { return draftRepository.saveDraft(newDraft); } DraftService(DraftRepository draftRepository); long save(NewDraft newDraft); DraftResult getDrafts(DraftSearchCriteria searchCriteria); void update(UpdateDraft updateDraft); void delete(List<Long> draftIdList); void delete(long draftId);  }