@SuppressWarnings("unchecked") @Test public void parse() throws Exception { DefaultParser defaultParser = new DefaultParser(); ContainerCreationContext containerCreationContext = ContainerCreationContext.builder().build(); Map<String, JobParameters.Builder> predefined = config.getPredefined(); JobParameters.Builder builder = predefined.get("job.sample"); Map<String, Object> map = (Map<String, Object>) builder.getParameters().get("container"); Map<String, Object> args = (Map<String, Object>) map.get("ni1.codeabovelab.com/cluster-manager"); defaultParser.parse(args, containerCreationContext); Assert.assertNotNull(containerCreationContext.getArgList()); List<ContainerSource> argList = containerCreationContext.getArgList(); ContainerSource createContainerArg = argList.get(0); Assert.assertEquals(new Integer(100), createContainerArg.getBlkioWeight()); }
@Override public void parse(String fileName, ContainerCreationContext context) { parse(fileName, context, ".properties"); parse(fileName, context, ".yml"); }
DefaultParser extends AbstractParser { @Override public void parse(String fileName, ContainerCreationContext context) { parse(fileName, context, ".properties"); parse(fileName, context, ".yml"); } }
DefaultParser extends AbstractParser { @Override public void parse(String fileName, ContainerCreationContext context) { parse(fileName, context, ".properties"); parse(fileName, context, ".yml"); }  }
DefaultParser extends AbstractParser { @Override public void parse(String fileName, ContainerCreationContext context) { parse(fileName, context, ".properties"); parse(fileName, context, ".yml"); }  @Override void parse(String fileName, ContainerCreationContext context); @Override void parse(File file, ContainerCreationContext context); @Override void parse(Map<String, Object> map, ContainerCreationContext context); @Override void parse(Map<String, Object> map, ContainerSource arg); }
DefaultParser extends AbstractParser { @Override public void parse(String fileName, ContainerCreationContext context) { parse(fileName, context, ".properties"); parse(fileName, context, ".yml"); }  @Override void parse(String fileName, ContainerCreationContext context); @Override void parse(File file, ContainerCreationContext context); @Override void parse(Map<String, Object> map, ContainerCreationContext context); @Override void parse(Map<String, Object> map, ContainerSource arg);  }