Objective implements Comparable<Objective> { @Override public String toString() { return getName() + "(" + getSign() + ")"; } Objective(String name);  Objective(String name, Sign sign); Sign getSign(); String getName(); @Override int compareTo(Objective other); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); static final Value<?> INFEASIBLE; }
@Test public void toStringTest() { Objective o = new Objective("obj", Sign.MAX); Assert.assertEquals("obj(MAX)", o.toString()); }