### Question:
XQueryRunConfig { public List<XQueryRunnerVariable> getVariables() { String count = getExpressionValue(numberOfVariablesExpression); int numberOfVariables = Integer.valueOf(count); List<XQueryRunnerVariable> result = new ArrayList<XQueryRunnerVariable>(numberOfVariables); for (int i = 1; i <= numberOfVariables; i++) { String baseXPath = "/run/variables/list/variable[" + i + "]/"; XQueryRunnerVariable variable = new XQueryRunnerVariable(); variable.ACTIVE = Boolean.parseBoolean(getExpressionValue(getExpression(baseXPath + "@active"))); variable.NAME = getExpressionValue(getExpression(baseXPath + "@name")); variable.NAMESPACE = getExpressionValue(getExpression(baseXPath + "@namespace")); variable.TYPE = getExpressionValue(getExpression(baseXPath + "@type")); variable.VALUE = getExpressionValue(getExpression("string(" + baseXPath + "text())")); result.add(variable); } return result; } XQueryRunConfig(String xml); String getMainFile(); boolean isContextItemEnabled(); boolean isContextItemFromEditorEnabled(); String getContextItemFile(); String getContextItemText(); List<XQueryRunnerVariable> getVariables(); XQueryDataSourceType getDataSourceType(); String getHost(); String getPort(); String getUsername(); String getPassword(); boolean isConfigFileEnabled(); String getConfigFile(); String getDatabaseName(); String getContextItemType(); boolean isDebugEnabled(); String getDebugPort();  }### Answer:
@Test public void shouldReturnZeroVariables() throws Exception { config = new XQueryRunConfig("<run/>"); List<XQueryRunnerVariable> result = config.getVariables(); assertThat(result.size(), is(0)); }
@Test public void shouldReturnVariables() { List<XQueryRunnerVariable> result = config.getVariables(); assertThat(result.get(0).ACTIVE, is(VARIABLE_ACTIVE)); assertThat(result.get(0).NAME, is(VARIABLE_NAME)); assertThat(result.get(0).NAMESPACE, is(VARIABLE_NAMESPACE)); assertThat(result.get(0).TYPE, is(VARIABLE_TYPE)); assertThat(result.get(0).VALUE, is(INNER_XML)); }