@RunWith(MockitoJUnitRunner.class)
public class LoginPresenterTest {

    @Mock
    private LoginService service;
    @Mock
    private LoginView view;
    private LoginPresenter presenter;

    @Before
    public void setUp() throws Exception {
        presenter = new LoginPresenter(view, service);
    }

    @Test
    public void shouldShowErrorMessageIfEmailIsEmpty() throws Exception {
        when(view.getEmail()).thenReturn("");
        presenter.onLoginClick();
        verify(view).showEmailError(R.string.error_message_email);
    }
}