### Question:
Resource { public static Resource create(final String uri, final ResourceType type) { return new Resource(uri, type); } 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 shouldNotAcceptNullUri() { Resource.create(null, null); }
@Test(expected = IllegalArgumentException.class) public void shouldNotAcceptNullUri2() { Resource.create(null); }
@Test(expected = NullPointerException.class) public void shouldNotAcceptNullResourceType() { Resource.create("resource.js", null); }
@Test public void shouldCreateResource() { Assert.assertNotNull(Resource.create("resource.js", ResourceType.JS)); }
@Test(expected = IllegalArgumentException.class) public void cannotCreateResourceWithUnkownExtension() { Assert.assertNotNull(Resource.create("resource.coffee")); }