@Test public void testEnsureExists() { final Object value = new Object(); assertTrue("expected same object reference value", value == BaseResource.ensureExists(value)); }
protected static <T> T ensureExists(T value) { if (value == null) { throw new WebApplicationException(Response.Status.NOT_FOUND); } return value; }
BaseResource { protected static <T> T ensureExists(T value) { if (value == null) { throw new WebApplicationException(Response.Status.NOT_FOUND); } return value; } }
BaseResource { protected static <T> T ensureExists(T value) { if (value == null) { throw new WebApplicationException(Response.Status.NOT_FOUND); } return value; }  }
BaseResource { protected static <T> T ensureExists(T value) { if (value == null) { throw new WebApplicationException(Response.Status.NOT_FOUND); } return value; }   }
BaseResource { protected static <T> T ensureExists(T value) { if (value == null) { throw new WebApplicationException(Response.Status.NOT_FOUND); } return value; }    }