SignupActivity extends RapidFtrActivity { public boolean isValid() { return validatesPresenceOfMandatoryFields() && isPasswordSameAsConfirmPassword(); }  boolean isValid(); void createUser(View view);  }
@Test public void shouldCheckIfMandatoryFieldsAreFilled() { assertThat(signupActivity.isValid(), equalTo(false)); assertEquals(userName.getError(), signupActivity.getString(R.string.username_required)); assertEquals(password.getError(), signupActivity.getString(R.string.password_required)); assertEquals(organisation.getError(), signupActivity.getString(R.string.organisation_required)); assertEquals(confirmPassword.getError(), signupActivity.getString(R.string.confirm_password_required)); }