Id { public static Id decode(String encodedId) { String[] parts = encodedId.split(SEPARATOR); if (parts.length != 2) { throw new IllegalArgumentException("Invalid encoded ID: \"" + encodedId + "\""); } return new Id(parts[0], parts[1]); } Id(io.v.syncbase.core.Id id);   Id(String blessing, String name); static Id decode(String encodedId); String encode(); String getName(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString();  }
@Test public void invalidEncoding() { thrown.expect(IllegalArgumentException.class); thrown.expectMessage("Invalid encoded ID"); Id.decode("not valid"); }