FlowUtils { public static Flow getFlow(final Project project, final String flowName) { final Project nonNullProj = requireNonNull(project); final Flow flow = nonNullProj.getFlow(flowName); if (flow == null) { throw new RuntimeException("Error finding the flow to execute " + flowName); } return flow; }  static Props addCommonFlowProperties(final Props parentProps,
      final ExecutableFlowBase flow); static void applyDisabledJobs(final List<DisabledJob> disabledJobs,
      final ExecutableFlowBase exflow); static Project getProject(final ProjectManager projectManager, final int projectId); static Flow getFlow(final Project project, final String flowName); static ExecutableFlow createExecutableFlow(final Project project, final Flow flow); static String toJson(final Project proj); static Project toProject(final String json);  }
@Test public void testGetFlow() throws Exception { final Flow flow = FlowUtils.getFlow(this.project, "jobe"); Assert.assertEquals(flow.getId(), "jobe"); assertThatThrownBy(() -> FlowUtils.getFlow(this.project, "nonexisting")) .isInstanceOf(RuntimeException.class); }