PosCap implements Comparable<PosCap>, Serializable { @Override public String toString() { return "PosCap{" + "partOfSpeech=" + partOfSpeech.toString() + ", capitalized=" + capitalized + '}'; } private  PosCap(PartOfSpeech partOfSpeech, boolean capitalized); static PosCap getCapitalized(PartOfSpeech partOfSpeech); static PosCap getNotCapitalized(PartOfSpeech partOfSpeech); static PosCap create(PartOfSpeech partOfSpeech, boolean capitalized); static int cardinality(); static PosCap createFromOrdinal(int ordinal); PartOfSpeech getPartOfSpeech(); boolean isCapitalized(); int ordinal(); @Override boolean equals(@Nullable Object o); @Override int hashCode(); @Override int compareTo(PosCap o); @Override String toString();  }
@Test public void testToString() { PosCap posCap = PosCap.create(PartOfSpeech.BOS, false); assertEquals(posCap.toString(), "PosCap{partOfSpeech=BOS, capitalized=false}"); }