hibernate-proxies

Hibernate Proxies

we can check if a we something is a hibernate proxy by check if it's instance of HibernateProxy.class method

assertThat(chessGame.getPlayerWhite()).isInstanceOf(HibernateProxy.class)

and we can check if's initialised by using

assertThat(Hibernate.isInitialized(chessGame.getPlayerWhite())).isFalse();

hibernate