VariableStoreConnector implements Connector { public String get(String name) throws IllegalStateException { final String variable = store.get(name); if (variable == null) { throw new IllegalStateException("Undefined variable: " + name); } LOGGER.debug("Got the variable '{}' with the value '{}'.", name, variable); return variable; } VariableStoreConnector(); @Override void reset(); @Override void dispose(); @Override void post(); void set(String name, String value); String get(String name); boolean contains(String name); Map<String, String> getStore(); VariableStoreConnector clone();  }
@Test(expected = IllegalStateException.class) public void shouldFailWhenFetchingANotSetVariable() { connector.get(VARIABLE_NAME); }