### Question:
ExampleUserDetails extends SocialUser { public static Builder getBuilder() { return new Builder(); } ExampleUserDetails(String username, String password, Collection<? extends GrantedAuthority> authorities); static Builder getBuilder(); Long getId(); String getFirstName(); String getLastName(); Role getRole(); SocialMediaService getSocialSignInProvider(); @Override String toString();  }### Answer:
@Test public void build_UserRegisteredByUsingFormRegistration_ShouldCreateNewObject() { ExampleUserDetails user = ExampleUserDetails.getBuilder() .firstName(FIRST_NAME) .id(ID) .lastName(LAST_NAME) .password(PASSWORD) .role(Role.ROLE_USER) .username(EMAIL) .build(); assertThat(user).hasFirstName(FIRST_NAME) .hasId(ID) .hasLastName(LAST_NAME) .hasPassword(PASSWORD) .hasUsername(EMAIL) .isActive() .isRegisteredUser() .isRegisteredByUsingFormRegistration(); }
@Test public void build_UserUsingSocialSignIn_ShouldCreateNewObject() { ExampleUserDetails user = ExampleUserDetails.getBuilder() .firstName(FIRST_NAME) .id(ID) .lastName(LAST_NAME) .password(null) .role(Role.ROLE_USER) .socialSignInProvider(SocialMediaService.TWITTER) .username(EMAIL) .build(); assertThat(user) .hasFirstName(FIRST_NAME) .hasId(ID) .hasLastName(LAST_NAME) .hasPassword(SOCIAL_USER_DUMMY_PASSWORD) .hasUsername(EMAIL) .isActive() .isRegisteredUser() .isSignedInByUsingSocialSignInProvider(SocialMediaService.TWITTER); }