@Test public void getConfirmationsByUsernameWhenUsernameIsNullShouldThrowException() { thrown.expect(NullPointerException.class); thrown.expectMessage("username"); service.getConfirmationsByUsername(null); }
public List<Confirmation> getConfirmationsByUsername(@NonNull final String username) { List<Confirmation> confirmations = repository.findAllByUsername(username); log.info("Query for user {} confirmations returned {} confirmations", username, confirmations.size()); return confirmations; }
ConfirmationService { public List<Confirmation> getConfirmationsByUsername(@NonNull final String username) { List<Confirmation> confirmations = repository.findAllByUsername(username); log.info("Query for user {} confirmations returned {} confirmations", username, confirmations.size()); return confirmations; } }
ConfirmationService { public List<Confirmation> getConfirmationsByUsername(@NonNull final String username) { List<Confirmation> confirmations = repository.findAllByUsername(username); log.info("Query for user {} confirmations returned {} confirmations", username, confirmations.size()); return confirmations; }  }
ConfirmationService { public List<Confirmation> getConfirmationsByUsername(@NonNull final String username) { List<Confirmation> confirmations = repository.findAllByUsername(username); log.info("Query for user {} confirmations returned {} confirmations", username, confirmations.size()); return confirmations; }  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 List<Confirmation> getConfirmationsByUsername(@NonNull final String username) { List<Confirmation> confirmations = repository.findAllByUsername(username); log.info("Query for user {} confirmations returned {} confirmations", username, confirmations.size()); return confirmations; }  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);  }