### Question:
CustomerName extends Base { public CustomerName withTitle(@Nullable final String title) { return new CustomerName(title, firstName, middleName, lastName); } private  CustomerName(@Nullable final String title, @Nullable final String firstName, @Nullable final String middleName, @Nullable final String lastName); @Nullable String getTitle(); @Nullable String getFirstName(); @Nullable String getMiddleName(); @Nullable String getLastName(); CustomerName withTitle(@Nullable final String title); CustomerName withMiddleName(@Nullable final String middleName); static CustomerName ofFirstAndLastName(@Nullable final String firstName, @Nullable final String lastName); static CustomerName ofTitleFirstAndLastName(@Nullable final String title, @Nullable final String firstName, @Nullable final String lastName); static CustomerName of(@Nullable final String title, @Nullable final String firstName, @Nullable final String middleName, @Nullable final String lastName);  }### Answer:
@Test public void withTitle() { final CustomerName customerName = CustomerName.ofFirstAndLastName("first", "last").withTitle("title"); assertThat(customerName.getFirstName()).isEqualTo("first"); assertThat(customerName.getLastName()).isEqualTo("last"); assertThat(customerName.getTitle()).isEqualTo("title"); assertThat(customerName.getMiddleName()).isNull(); }