@Test public void parseSuccessfully() { String hashString = "SHA-256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4" + "649b934ca495991b7852b855"; Hash h = new Hash(hashString); assertEquals("SHA-256", h.getAlgoId()); assertEquals("e3b0c44298fc1c149afbf4c8996fb92427ae41e4" + "649b934ca495991b7852b855", h.getHashValue()); assertEquals(hashString, h.toString()); }
@Override public String toString() { return algoId + SEPARATOR + hashValue; }
Hash { @Override public String toString() { return algoId + SEPARATOR + hashValue; } }
Hash { @Override public String toString() { return algoId + SEPARATOR + hashValue; } Hash(String hashString);  Hash(String algoId, String hashValue); }
Hash { @Override public String toString() { return algoId + SEPARATOR + hashValue; } Hash(String hashString);  Hash(String algoId, String hashValue); @Override String toString(); }
Hash { @Override public String toString() { return algoId + SEPARATOR + hashValue; } Hash(String hashString);  Hash(String algoId, String hashValue); @Override String toString();  }