### Question:
RegistrationForm { public boolean isNormalRegistration() { return signInProvider == null; } RegistrationForm(); boolean isNormalRegistration(); boolean isSocialSignIn(); String getEmail(); void setEmail(String email); String getFirstName(); void setFirstName(String firstName); String getLastName(); void setLastName(String lastName); String getPassword(); void setPassword(String password); String getPasswordVerification(); void setPasswordVerification(String passwordVerification); SocialMediaService getSignInProvider(); void setSignInProvider(SocialMediaService signInProvider); @Override String toString(); static final String FIELD_NAME_EMAIL; }### Answer:
@Test public void isNormalRegistration_SocialProviderNotSet_ShouldReturnTrue() { RegistrationForm dto = new RegistrationFormBuilder().build(); boolean isNormalRegistration = dto.isNormalRegistration(); assertThat(isNormalRegistration).isTrue(); }
@Test public void isNormalRegistration_SocialProviderSet_ShouldReturnFalse() { RegistrationForm dto = new RegistrationFormBuilder() .isSocialSignInViaSignInProvider(SIGN_IN_PROVIDER) .build(); boolean isNormalRegistration = dto.isNormalRegistration(); assertThat(isNormalRegistration).isFalse(); }