- @Test(expected = IllegalAccessException.class)
- public void testJPAUtils() throws IllegalAccessException {
- // Setup test data
- EntityManagerFactory emf = Mockito.mock(EntityManagerFactory.class);
- EntityManager em = Mockito.mock(EntityManager.class);
- Query query = Mockito.mock(Query.class);
- Mockito.when(emf.createEntityManager()).thenReturn(em);
- Mockito.when(em.createNamedQuery(Mockito.any())).thenReturn(query);
+ @BeforeClass
+ public static void beforeClassSetup() {
+ PolicyDBDaoTest.setupH2DbDaoImpl("jpautilstest");
+ new JPAUtils(new CommonClassDaoImpl());
+ }
+
+ @Test(expected = IllegalAccessException.class)
+ public void testJpaUtils() throws IllegalAccessException {