### Question:
HttpTrace extends HttpUriRequestBase { @Override public void setEntity(final HttpEntity entity) { throw new IllegalStateException(METHOD_NAME + " requests may not include an entity."); } HttpTrace(final URI uri);  HttpTrace(final String uri); @Override void setEntity(final HttpEntity entity); final static String METHOD_NAME; }### Answer:
@Test(expected = IllegalStateException.class) public void testHttpTraceSetEntity() { final HttpTrace httpTrace = new HttpTrace("/path"); httpTrace.setEntity(null); }