@Test(expected = ExecutorManagerException.class)
public void testTooManySubmitFlows() throws Exception {

  testSetUpForRunningFlows();
  final ExecutableFlow flow1 = TestUtils
      .createTestExecutableFlowFromYaml("basicyamlshelltest", "bashSleep");
  flow1.setExecutionId(101);
  final ExecutableFlow flow2 = TestUtils
      .createTestExecutableFlowFromYaml("basicyamlshelltest", "bashSleep");
  flow2.setExecutionId(102);
  final ExecutableFlow flow3 = TestUtils
      .createTestExecutableFlowFromYaml("basicyamlshelltest", "bashSleep");
  flow3.setExecutionId(103);
  final ExecutableFlow flow4 = TestUtils
      .createTestExecutableFlowFromYaml("basicyamlshelltest", "bashSleep");
  flow4.setExecutionId(104);
  this.manager.submitExecutableFlow(flow1, this.user.getUserId());
  verify(this.loader).uploadExecutableFlow(flow1);
  this.manager.submitExecutableFlow(flow2, this.user.getUserId());
  verify(this.loader).uploadExecutableFlow(flow2);
  this.manager.submitExecutableFlow(flow3, this.user.getUserId());
  this.manager.submitExecutableFlow(flow4, this.user.getUserId());
}