Employee { public String fullName() { return getFirstName() + " " + getLastName(); }  Integer getIncome(); void setIncome(int income); Long getId(); void setId(Long id); String getFirstName(); void setFirstName(String firstName); String fullName(); String getLastName(); void setLastName(String lastName); String getEmail(); void setEmail(String email); @Override String toString(); static final String GET_ALL; static final String GET_ALL_QUERY; }
@Test public void testFullName() throws Exception { Employee employee = new Employee(); employee.setFirstName("XYZ"); employee.setLastName("ABC"); assertThat(employee.fullName()).isEqualTo("XYZ ABC"); }