RequestHandler2Adaptor extends RequestHandler2 { @Override public int hashCode() { return old.hashCode(); } RequestHandler2Adaptor(@SuppressWarnings("deprecation") RequestHandler old); @SuppressWarnings("deprecation") @Override void beforeRequest(Request<?> request); @SuppressWarnings("deprecation") @Override void afterResponse(Request<?> request, Response<?> response); @SuppressWarnings("deprecation") @Override void afterError(Request<?> request, Response<?> response,
            Exception e); @Override int hashCode(); @Override boolean equals(Object o);  }
@Test public void sameOldButDiffAdapters() { RequestHandler old = createRequestHandler(); RequestHandler2 new1 = new RequestHandler2Adaptor(old); RequestHandler2 new2 = new RequestHandler2Adaptor(old); assertNotSame(new1, new2); assertEquals(new1, new2); assertTrue(new1.hashCode() == new2.hashCode()); }