DefaultStellarShellExecutor implements StellarShellExecutor { @Override @SuppressWarnings("unchecked") public Map<String, Object> getGlobalConfig() { Map<String, Object> globals; Optional<Object> capability = getContext().getCapability(GLOBAL_CONFIG, false); if (capability.isPresent()) { globals = (Map<String, Object>) capability.get(); } else { throw new IllegalStateException("'GLOBAL_CONFIG' is missing"); } return globals; } DefaultStellarShellExecutor(
          FunctionResolver functionResolver,
          Properties properties,
          Optional<String> zookeeperUrl,
          List<SpecialCommand> specials);  DefaultStellarShellExecutor(
          FunctionResolver functionResolver,
          Properties properties,
          Optional<String> zookeeperUrl);  DefaultStellarShellExecutor(
          Properties properties,
          Optional<String> zookeeperUrl); static List<SpecialCommand> defaultSpecials(); @Override void init(); @Override void addFunctionListener(FunctionDefinedListener listener); @Override void addVariableListener(VariableDefinedListener listener); @Override void addSpecialListener(SpecialDefinedListener listener); @Override StellarResult execute(String expression); @Override @SuppressWarnings("unchecked") Map<String, Object> getGlobalConfig(); @Override void assign(String variableName, Object value, Optional<String> expression); @Override FunctionResolver getFunctionResolver(); @Override @SuppressWarnings("unchecked") Map<String, VariableResult> getState(); Map<String, Object> getVariables(); @Override Context getContext(); static final String SHELL_VARIABLES; }
@Test public void testEmptyGlobalsWithNoZookeeper() { assertNotNull(executor.getGlobalConfig()); assertEquals(0, executor.getGlobalConfig().size()); }