@Test public void testToString() throws Exception { UUID id = UUID.randomUUID(); String name = "Bjorn"; int salary = 445; double level = 1; Aerodynamicist aerodynamicist = new Aerodynamicist(id, name, salary, level); assertEquals(String.format("Aerodynamicist(id=%s, name=%s, salary=%d, level=%f)", id, name, salary, level), aerodynamicist.toString()); }
@Override public String toString() { return String.format("Aerodynamicist(id=%s, name=%s, salary=%d, level=%f)", getId(), getName(), getSalary(), getLevel()); }
Aerodynamicist extends Specialist { @Override public String toString() { return String.format("Aerodynamicist(id=%s, name=%s, salary=%d, level=%f)", getId(), getName(), getSalary(), getLevel()); } }
Aerodynamicist extends Specialist { @Override public String toString() { return String.format("Aerodynamicist(id=%s, name=%s, salary=%d, level=%f)", getId(), getName(), getSalary(), getLevel()); } Aerodynamicist(UUID id, String name, int salary, double level); protected  Aerodynamicist(); }
Aerodynamicist extends Specialist { @Override public String toString() { return String.format("Aerodynamicist(id=%s, name=%s, salary=%d, level=%f)", getId(), getName(), getSalary(), getLevel()); } Aerodynamicist(UUID id, String name, int salary, double level); protected  Aerodynamicist(); @Override String toString(); }
Aerodynamicist extends Specialist { @Override public String toString() { return String.format("Aerodynamicist(id=%s, name=%s, salary=%d, level=%f)", getId(), getName(), getSalary(), getLevel()); } Aerodynamicist(UUID id, String name, int salary, double level); protected  Aerodynamicist(); @Override String toString();  }