protected static final String COMMITTER = "testuser";
protected static final String CONTEXT = "testcontext";
@Before
public void initDB() throws Exception {
AuthenticationContext authenticationContext = mock(AuthenticationContext.class);
when(authenticationContext.getAuthenticatedPrincipal()).thenReturn(COMMITTER);
EntityManager em = testPersistenceUnit.getEntityManager("edb");
JPADao dao = new DefaultJPADao(em);
EDBPreCommitHook preCommitHook = new CheckPreCommitHook(dao);
ContextHolder.get().setCurrentContextId(CONTEXT);