SplitIndex { public static SplitIndex valueOf(int index, boolean last) { return new SplitIndex(index, last); } private  SplitIndex(int index, boolean last); static SplitIndex valueOf(int index, boolean last); int getIndex(); boolean isLast(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }
@Test public void testValueOf() { SplitIndex index = SplitIndex.valueOf(14, true); assertEquals(14, index.getIndex()); assertEquals(true, index.isLast()); }