### Question:
Resource { public void setUri(final String uri) { notNull(uri, "Uri cannot be null!"); this.uri = cleanUri(uri); } Resource(); private  Resource(final String uri, final ResourceType type); static Resource create(final String uri, final ResourceType type); static Resource create(final String uri); void setType(final ResourceType type); void setUri(final String uri); ResourceType getType(); String getUri(); boolean isMinimize(); void setMinimize(final boolean minimize); @Override boolean equals(final Object obj); @Override int hashCode(); @Override String toString();  }### Answer:
@Test(expected = NullPointerException.class) public void cannotSetNullUri() { final Resource resource = new Resource(); resource.setUri(null); }