### Question:
SnapshotResolver { public static Builder builder() { return new Builder(); } private  SnapshotResolver(ResourceSnapshotResolver resolver); URI toURI(ResourceSnapshot snapshot); ResourceSnapshot fromURI(URI endpoint); static Builder builder();  }### Answer:
@Test(expected=NullPointerException.class) public void testBuilder$nullSession() { SnapshotResolver. builder(). withReadSession(null). withCanonicalBase(CANONICAL_BASE). build(); }
@Test(expected=NullPointerException.class) public void testBuilder$nullCanonicalBase(@Mocked ReadSession session) { SnapshotResolver. builder(). withReadSession(session). withCanonicalBase(null). build(); }
@Test(expected=IllegalArgumentException.class) public void testBuilder$nonHierarchicalCanonicalBase(@Mocked ReadSession session) { SnapshotResolver. builder(). withReadSession(session). withCanonicalBase(NON_HIERARCHICAL_CANONICAL_BASE). build(); }
@Test(expected=IllegalArgumentException.class) public void testBuilder$nonAbsoluteCanonicalBase(@Mocked ReadSession session) { SnapshotResolver. builder(). withReadSession(session). withCanonicalBase(NON_ABSOLUTE_CANONICAL_BASE). build(); }
@Test public void testBuilder$validBase(@Mocked ReadSession session, final @Mocked ResourceSnapshotResolver resolver) { buildResolver(session, resolver); }