@Test
public void testExceptionIsThrownIfFieldAnnotatedWithPersistenceContextIsNotOfTypeEntityManager() throws Exception {

    // GIVEN
    // EXPECT
    expectedException.expect(IllegalArgumentException.class);
    // WHEN
    JpaUnitContext.getInstance(ClassWithWrongPersistenceContextType.class);
    // THEN
    // IllegalArgumentException is thrown
}