protected static FlowManager deployFlow(Class<? extends Flow> flowClz, Map<String, String> runtimeArgs,
File...bundleEmbeddedJars) {
Preconditions.checkNotNull(flowClz, "Flow class cannot be null");
try {
Location deployJar = deployClient.jarForTestBase(flowClz, bundleEmbeddedJars);
ProgramController controller = deployClient.startFlow(new File(deployJar.toURI()), flowClz.getName(),
tmpFolder.newFolder(), runtimeArgs);
return new DefaultFlowManager(controller);
} catch (Exception e) {
throw Throwables.propagate(e);
}