@Test
public void should_show_error_when_invalid_user_format() {

    when(loginService.isUsernameValid("pri mero")).thenReturn(false);
    when(loginService.isPasswordValid("password")).thenReturn(true);
    when(loginService.isUrlValid("http://10.29.3.184:3000")).thenReturn(true);
    boolean valid = loginPresenter.validate("pri mero", "password", "http://10.29.3.184:3000");
    verify(loginView).showUserNameInvalid();
    assertEquals(valid, false);
}