### Question:
ProfilesExpressionObject { public Function<UserProfile, String> getName() { return UserProfile::getName; } ProfilesExpressionObject(final ProfileService profileService); Optional<UserProfile> findByUserId(final String userId); Function<UserProfile, String> getName();  }### Answer:
@Test public void getName() { final String name = "jhgk"; final UserProfile userProfile = UserProfile.builder().name(name).build(); final Function<UserProfile, String> result = profiles.getName(); assertThat(result.apply(userProfile)).isEqualTo(name); }