@Test
  public void testInvokeFlowFromJava()
      throws CompilationFailedException, InstantiationException, IllegalAccessException {
    builder.setAutoCreateApplicationContext(false);
    String flowScript1 =
        "messageFlow(outputChannel:'outputChannel1') {transform({it.toUpperCase()})}";

    MessageFlow flow1 =
        (MessageFlow) builder.build(new ByteArrayInputStream(flowScript1.getBytes()));

    String flowScript2 =
        ("messageFlow(inputChannel:'outputChannel1'){ filter({it.class == String})\ntransform({it.toLowerCase()})}");

    builder.build(new ByteArrayInputStream(flowScript2.getBytes()));

    Object response =
        builder.getIntegrationContext().sendAndReceive(flow1.getInputChannel(), "hello");

    assertEquals("hello", response);
  }