@Test public void testDifferentObjectDifferentStrings() { XdrOpaque opaque1 = new XdrOpaque("some bytes".getBytes(StandardCharsets.UTF_8)); XdrOpaque opaque2 = new XdrOpaque("some other bytes".getBytes(StandardCharsets.UTF_8)); assertNotNull("toString should not return null", opaque1.toString()); assertNotNull("toString should not return null", opaque2.toString()); assertNotEquals("different by value must return different strings", opaque1.toString(), opaque2.toString()); }
@Override public String toString() { return new StringBuilder() .append('[') .append(BaseEncoding.base16().upperCase().encode(_opaque)) .append(']') .toString(); }
XdrOpaque implements XdrAble { @Override public String toString() { return new StringBuilder() .append('[') .append(BaseEncoding.base16().upperCase().encode(_opaque)) .append(']') .toString(); } }
XdrOpaque implements XdrAble { @Override public String toString() { return new StringBuilder() .append('[') .append(BaseEncoding.base16().upperCase().encode(_opaque)) .append(']') .toString(); } XdrOpaque();  XdrOpaque(byte[] opaque);  XdrOpaque(XdrDecodingStream xdr); }
XdrOpaque implements XdrAble { @Override public String toString() { return new StringBuilder() .append('[') .append(BaseEncoding.base16().upperCase().encode(_opaque)) .append(']') .toString(); } XdrOpaque();  XdrOpaque(byte[] opaque);  XdrOpaque(XdrDecodingStream xdr); byte[] getOpaque(); @Override int hashCode(); @Override boolean equals(Object o); @Override String toString(); @Override void xdrDecode(XdrDecodingStream xdr); @Override void xdrEncode(XdrEncodingStream xdr); }
XdrOpaque implements XdrAble { @Override public String toString() { return new StringBuilder() .append('[') .append(BaseEncoding.base16().upperCase().encode(_opaque)) .append(']') .toString(); } XdrOpaque();  XdrOpaque(byte[] opaque);  XdrOpaque(XdrDecodingStream xdr); byte[] getOpaque(); @Override int hashCode(); @Override boolean equals(Object o); @Override String toString(); @Override void xdrDecode(XdrDecodingStream xdr); @Override void xdrEncode(XdrEncodingStream xdr);  }