@Test
public void shouldAddNewUserToDatabaseUsingAnyMatcherTypedOutside() throws UserAlreadyRegisteredException, IOException {

    String emailAddress = "foo@example.com";
    when(mockDatabase.hasUser(emailAddress)).thenReturn(false);
    when(mockEmailSender
            .sendRegistrationEmail(ArgumentMatchers.<RegistrationEmail>any()))
            .thenReturn(true);
    testee.registerNewUser(emailAddress);
    Mockito.verify(mockDatabase).addUser(emailAddress);
}