Id implements Comparable<Id> { public static Id fromString(String id) { return new Id(Long.parseLong(id, 16)); } private  Id(Long id); static Id makeRandom(); static Id fromString(String id); static Id fromAdId(AdId id); boolean equals(Object obj); int hashCode(); String toString(); AdId toAdId(); Long toLong(); @Override int compareTo(Id another);  }
@Test public void fromStringFailure() { mThrown.expect(java.lang.IllegalArgumentException.class); mThrown.expectMessage("For input string: \"pizza\""); Id id = Id.fromString("pizza"); }