Orbit implements Iterable<Integer>, Cloneable { public void sort() { Collections.sort(this.atomIndices); } Orbit(String label, int height); @Override Iterator<Integer> iterator(); @Override Object clone(); void sort(); int getHeight(); List<Integer> getAtomIndices(); void addAtom(int atomIndex); boolean hasLabel(String otherLabel); boolean isEmpty(); int getFirstAtom(); void remove(int atomIndex); String getLabel(); boolean contains(int atomIndex); @Override String toString();  }
@Test public void sortTest() { Assert.assertFalse("Unsorted orbit is actually sorted", isSorted(unsortedOrbit)); unsortedOrbit.sort(); Assert.assertTrue("Orbit is not sorted after sort called", isSorted(unsortedOrbit)); }