Orbit implements Iterable<Integer>, Cloneable { public boolean isEmpty() { return this.atomIndices.isEmpty(); } 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 isEmptyTest() { Assert.assertFalse("The setUp method should have made an orbit with " + "some indices in it", orbit.isEmpty()); List<Integer> indices = new ArrayList<Integer>(); for (int index : orbit) { indices.add(index); } for (int index : indices) { orbit.remove(index); } Assert.assertTrue("Orbit should now be empty", orbit.isEmpty()); }