@Test public void testGetQuestionDraft() { final String intygId = "intygId"; when(repo.findByIntygIdAndQuestionId(intygId, null)).thenReturn(buildArendeDraft(intygId, null, null, null)); ArendeDraft res = arendeDraftService.getQuestionDraft(intygId); assertNotNull(res); assertEquals(intygId, res.getIntygId()); verify(repo).findByIntygIdAndQuestionId(intygId, null); verifyNoMoreInteractions(repo); }
@Override public ArendeDraft getQuestionDraft(String intygId) { return arendeDraftRepository.findByIntygIdAndQuestionId(intygId, null); }
ArendeDraftServiceImpl implements ArendeDraftService { @Override public ArendeDraft getQuestionDraft(String intygId) { return arendeDraftRepository.findByIntygIdAndQuestionId(intygId, null); } }
ArendeDraftServiceImpl implements ArendeDraftService { @Override public ArendeDraft getQuestionDraft(String intygId) { return arendeDraftRepository.findByIntygIdAndQuestionId(intygId, null); }  }
ArendeDraftServiceImpl implements ArendeDraftService { @Override public ArendeDraft getQuestionDraft(String intygId) { return arendeDraftRepository.findByIntygIdAndQuestionId(intygId, null); }  @Override boolean saveDraft(String intygId, String questionId, String text, String amne); @Override boolean delete(String intygId, String questionId); @Override List<ArendeDraft> listAnswerDrafts(String intygId); @Override ArendeDraft getQuestionDraft(String intygId); }
ArendeDraftServiceImpl implements ArendeDraftService { @Override public ArendeDraft getQuestionDraft(String intygId) { return arendeDraftRepository.findByIntygIdAndQuestionId(intygId, null); }  @Override boolean saveDraft(String intygId, String questionId, String text, String amne); @Override boolean delete(String intygId, String questionId); @Override List<ArendeDraft> listAnswerDrafts(String intygId); @Override ArendeDraft getQuestionDraft(String intygId);  }