Extend SpringProcessEngingeTestCase in engine-spring module and package org.camunda.bpm.engine.spring.impl.test to allow application context configuration by a java class.
The attached code is provided by Carsten Piepel who is involved in the linked support case.