ResultCodes implements Comparable<ResultCodes> { @Override public int hashCode() { return Arrays.hashCode(resultCodes); } ResultCodes(final int... resultCodes); @Override boolean equals(final Object o); @Override int hashCode(); @Override @SuppressWarnings("PMD.CyclomaticComplexity") int compareTo(final ResultCodes o);  }
@Test public void hashCodes() { assertEquals(new ResultCodes(-1).hashCode(), new ResultCodes(-1).hashCode()); assertEquals(new ResultCodes(0).hashCode(), new ResultCodes(0).hashCode()); assertEquals(new ResultCodes(1).hashCode(), new ResultCodes(1).hashCode()); assertEquals(new ResultCodes(-1, 0).hashCode(), new ResultCodes(-1, 0).hashCode()); assertNotEquals(new ResultCodes().hashCode(), new ResultCodes(0).hashCode()); assertNotEquals(new ResultCodes(1, 2).hashCode(), new ResultCodes(0).hashCode()); assertNotEquals(new ResultCodes(-1).hashCode(), new ResultCodes(0).hashCode()); assertNotEquals(new ResultCodes(0).hashCode(), new ResultCodes(1).hashCode()); }