@Test public void hasConfirmedEncounterForUnconfirmedEncounterShouldReturnFalse() { given(repository.findByUsernameAndEncounterId(anyString(), anyLong())).willReturn(null); boolean hasConfirmedEncounter = service.hasConfirmedEncounter("test", 1); assertThat(hasConfirmedEncounter).isFalse(); }
public boolean hasConfirmedEncounter(@NonNull final String username, final long encounterId) { return getConfirmationByUsernameAndEncounterId(username, encounterId) != null; }
ConfirmationService { public boolean hasConfirmedEncounter(@NonNull final String username, final long encounterId) { return getConfirmationByUsernameAndEncounterId(username, encounterId) != null; } }
ConfirmationService { public boolean hasConfirmedEncounter(@NonNull final String username, final long encounterId) { return getConfirmationByUsernameAndEncounterId(username, encounterId) != null; }  }
ConfirmationService { public boolean hasConfirmedEncounter(@NonNull final String username, final long encounterId) { return getConfirmationByUsernameAndEncounterId(username, encounterId) != null; }  List<Confirmation> getConfirmationsByUsername(@NonNull final String username); Confirmation getConfirmationByUsernameAndEncounterId(@NonNull final String username,
                                                                final long encounterId); Confirmation addConfirmation(@NotNull final String username, final long encounterId); void deleteConfirmation(@NonNull final String username, final long confirmationId); boolean hasConfirmedEncounter(@NonNull final String username, final long encounterId); List<Confirmation> getConfirmations(final String type); }
ConfirmationService { public boolean hasConfirmedEncounter(@NonNull final String username, final long encounterId) { return getConfirmationByUsernameAndEncounterId(username, encounterId) != null; }  List<Confirmation> getConfirmationsByUsername(@NonNull final String username); Confirmation getConfirmationByUsernameAndEncounterId(@NonNull final String username,
                                                                final long encounterId); Confirmation addConfirmation(@NotNull final String username, final long encounterId); void deleteConfirmation(@NonNull final String username, final long confirmationId); boolean hasConfirmedEncounter(@NonNull final String username, final long encounterId); List<Confirmation> getConfirmations(final String type);  }