DefaultCacheManager cm = (DefaultCacheManager) context.get(EnvironmentName.ENTITY_MANAGER_FACTORY);
Cache<String, Object> cache = cm.getCache("jbpm-configured-cache");
CorrelationKeyInfo correlationKey = new CorrelationKeyInfo();
correlationKey.addProperty(new CorrelationPropertyInfo("", "test123"));
Long processInstance = new InfinispanProcessPersistenceContext(cache).getProcessInstanceByCorrelationKey(correlationKey);
assertNotNull(processInstance);
assertEquals(correlationKey.getProcessInstanceId(), processInstance.longValue());
}