DefDescriptor<TypeDef> JavaValueDefDescMocked = Mockito.spy(JavaValueDefDesc);
Mockito.when(JavaValueDefDescMocked.getDef()).thenThrow(new TestQuickFixException("new quick fix exception"));
//time to ask MDR give us what we want
String name = "java://org.auraframework.impl.java.controller.JavaControllerTest$JavaValueDefExt";
Class<TypeDef> defClass = TypeDef.class;
DescriptorKey dk = new DescriptorKey(name, defClass);
Cache<DescriptorKey, DefDescriptor<? extends Definition>> cache =
Aura.getCachingService().getDefDescriptorByNameCache();
cache.put(dk, JavaValueDefDescMocked);
//jvd doesn't matter that much for triggering QFE, as we only used it as the Object param