@Test public void getFullName() { var firstName = "First"; var lastName = "Last"; var expectedFullName = String.format("%s %s", firstName, lastName); var userData = new UserData() .setFirstName(firstName) .setLastName(lastName); var actualLastName = userData.getFullName(); assertThat(actualLastName).isEqualTo(expectedFullName); }
public String getFullName() { return String.format("%s %s", firstName, lastName); }
UserData { public String getFullName() { return String.format("%s %s", firstName, lastName); } }
UserData { public String getFullName() { return String.format("%s %s", firstName, lastName); } UserData(User user, String firstName, String lastName, String email, String lob);  UserData(User user, String firstName, String lastName, String email, String lob, byte[] picture); }
UserData { public String getFullName() { return String.format("%s %s", firstName, lastName); } UserData(User user, String firstName, String lastName, String email, String lob);  UserData(User user, String firstName, String lastName, String email, String lob, byte[] picture); String getFullName(); }
UserData { public String getFullName() { return String.format("%s %s", firstName, lastName); } UserData(User user, String firstName, String lastName, String email, String lob);  UserData(User user, String firstName, String lastName, String email, String lob, byte[] picture); String getFullName();  }