### Question:
CollectionId implements Serializable { public static CollectionId of(String id) { Preconditions.checkNotNull(id); Integer intValue = Integer.valueOf(id); return of(intValue); } private  CollectionId(int collectionId); static CollectionId of(String id); static CollectionId of(int collectionId); String asString(); int asInt(); ServerId serverId(int itemId); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); static final CollectionId ROOT; }### Answer:
@Test(expected=IllegalArgumentException.class) public void builderShouldThrowOnNegativeInteger() { CollectionId.of(-12); }
@Test(expected=IllegalArgumentException.class) public void builderShouldThrowOnEmptyString() { CollectionId.of(""); }
@Test(expected=IllegalArgumentException.class) public void builderShouldThrowOnNonInteger() { CollectionId.of("fdq"); }
@Test(expected=IllegalArgumentException.class) public void builderShouldThrowOnStringEncodedNegativeInteger() { CollectionId.of("-12"); }
@Test(expected=NullPointerException.class) public void builderShouldThrowOnNullString() { CollectionId.of(null); }