protected void initContext() { context = new FormRenderContext(CTX_UID, form, inputs, outputs); when(formRenderContextManager.getFormRenderContext(anyString())).thenReturn(context); when(formRenderContextManager.getRootContext(anyString())).thenReturn(context); } }
private FormRenderContext buildContext(String uid, Form form, String serverTemplateId, Map<String, Object> inputData, Map<String, Object> outputData, Map<String, Object> forms) { FormRenderContext ctx = new FormRenderContext(uid, form, inputData, outputData); ctx.setServerTemplateId(serverTemplateId); ctx.setContextForms(forms); formRenderContextMap.put(uid, ctx); formProcessor.read(ctx.getUID()); return ctx; }