SetVariableAction extends SymbolAction { public void setValue(String value) { this.value = value; }  @Override ExecuteResult execute(ConnectorManager connector); String getName(); void setName(String name); String getValue(); void setValue(String value);  }
@Test public void shouldSuccessfulSetTheVariableValueWithCounter() { CounterStoreConnector counters = mock(CounterStoreConnector.class); given(counters.get("counter")).willReturn(2); WebSiteConnector webSiteConnector = mock(WebSiteConnector.class); VariableStoreConnector variables = mock(VariableStoreConnector.class); ConnectorManager connector = mock(ConnectorManager.class); given(connector.getConnector(WebSiteConnector.class)).willReturn(webSiteConnector); given(connector.getConnector(CounterStoreConnector.class)).willReturn(counters); given(connector.getConnector(VariableStoreConnector.class)).willReturn(variables); setAction.setValue(TEST_VALUE + "{{#counter}}"); ExecuteResult result = setAction.executeAction(connector); assertTrue(result.isSuccess()); verify(variables).set(TEST_NAME, TEST_VALUE + "2"); }