HibernateObjectReplacer implements ObjectReplacer { @Override public Object replaceObject(Object object) { if (object instanceof HibernateProxy) { return ((HibernateProxy) object).getHibernateLazyInitializer().getImplementation(); } return object; }  @Override Object replaceObject(Object object);  }
@Test public void testNotAProxyCanConvert() throws Exception { Object object = new Object(); assertThat(determinator.replaceObject(object)).isEqualTo(object); }