@Test public void unapply() { RuntimeContext context = RuntimeContext.DEFAULT .mode(ExecutionMode.SIMULATION) .batchId("testing.batch") .buildId("testing.verify"); Map<String, String> map = context.unapply(); assertThat(RuntimeContext.DEFAULT.apply(map), is(context)); }
public Map<String, String> unapply() { Map<String, String> results = new HashMap<>(); put(results, KEY_EXECUTION_MODE, mode.getSymbol()); put(results, KEY_BATCH_ID, batchId); put(results, KEY_BUILD_ID, buildId); return results; }
RuntimeContext { public Map<String, String> unapply() { Map<String, String> results = new HashMap<>(); put(results, KEY_EXECUTION_MODE, mode.getSymbol()); put(results, KEY_BATCH_ID, batchId); put(results, KEY_BUILD_ID, buildId); return results; } }
RuntimeContext { public Map<String, String> unapply() { Map<String, String> results = new HashMap<>(); put(results, KEY_EXECUTION_MODE, mode.getSymbol()); put(results, KEY_BATCH_ID, batchId); put(results, KEY_BUILD_ID, buildId); return results; } private  RuntimeContext(); private  RuntimeContext(ExecutionMode mode, String batchId, String verificationCode); }
RuntimeContext { public Map<String, String> unapply() { Map<String, String> results = new HashMap<>(); put(results, KEY_EXECUTION_MODE, mode.getSymbol()); put(results, KEY_BATCH_ID, batchId); put(results, KEY_BUILD_ID, buildId); return results; } private  RuntimeContext(); private  RuntimeContext(ExecutionMode mode, String batchId, String verificationCode); static RuntimeContext get(); static void set(RuntimeContext context); static String getRuntimeVersion(); RuntimeContext mode(ExecutionMode newValue); RuntimeContext batchId(String newValue); RuntimeContext buildId(String newValue); RuntimeContext apply(Map<String, String> newValueMap); Map<String, String> unapply(); boolean isSimulation(); boolean canExecute(Object object); void verifyApplication(ClassLoader classLoader); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); }
RuntimeContext { public Map<String, String> unapply() { Map<String, String> results = new HashMap<>(); put(results, KEY_EXECUTION_MODE, mode.getSymbol()); put(results, KEY_BATCH_ID, batchId); put(results, KEY_BUILD_ID, buildId); return results; } private  RuntimeContext(); private  RuntimeContext(ExecutionMode mode, String batchId, String verificationCode); static RuntimeContext get(); static void set(RuntimeContext context); static String getRuntimeVersion(); RuntimeContext mode(ExecutionMode newValue); RuntimeContext batchId(String newValue); RuntimeContext buildId(String newValue); RuntimeContext apply(Map<String, String> newValueMap); Map<String, String> unapply(); boolean isSimulation(); boolean canExecute(Object object); void verifyApplication(ClassLoader classLoader); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); static final RuntimeContext DEFAULT; static final String PATH_APPLICATION_INFO; static final String KEY_EXECUTION_MODE; static final String KEY_BATCH_ID; static final String KEY_FLOW_ID; static final String KEY_BUILD_ID; static final String KEY_BUILD_DATE; static final String KEY_RUNTIME_VERSION; }