Component implements ComponentProvider { @Override public int hashCode() { return Arrays.hashCode(this.getComponent()); } protected  Component(byte[] comp);  Component(String text); @Override byte[] getComponent(); static byte[] parseNative(String name); static byte[] parseURI(String name); static String hexPrint(byte [] bs); static String printNative(byte[] bs); static String printURI(byte [] bs); static String printURI(byte [] bs, int offset, int length); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); static final ComponentProvider NONCE; static final ComponentProvider EMPTY; }
@Test public void testHashCode() { Component a = new Component(COMPONENT_NAME_BYTES); Component b = new Component(COMPONENT_NAME_BYTES); Assert.assertEquals(a.hashCode(), b.hashCode()); }