@Test(expected = IllegalStateException.class) public void shouldFailToGetTheCounterIfNotDefined() { connector.get(COUNTER_NAME); }
public Integer get(String name) throws IllegalStateException { if (!countersMap.containsKey(name)) { throw new IllegalStateException("Undefined counter: " + name); } return countersMap.get(name); }
CounterStoreConnector implements Connector { public Integer get(String name) throws IllegalStateException { if (!countersMap.containsKey(name)) { throw new IllegalStateException("Undefined counter: " + name); } return countersMap.get(name); } }
CounterStoreConnector implements Connector { public Integer get(String name) throws IllegalStateException { if (!countersMap.containsKey(name)) { throw new IllegalStateException("Undefined counter: " + name); } return countersMap.get(name); } CounterStoreConnector(CounterDAO counterDAO, User user, Project project, List<Counter> counterList); }
CounterStoreConnector implements Connector { public Integer get(String name) throws IllegalStateException { if (!countersMap.containsKey(name)) { throw new IllegalStateException("Undefined counter: " + name); } return countersMap.get(name); } CounterStoreConnector(CounterDAO counterDAO, User user, Project project, List<Counter> counterList); @Override void reset(); @Override void dispose(); @Override void post(); void set(Long projectId, String name, Integer value); void incrementBy(Long projectId, String name, int incrementBy); Integer get(String name); boolean contains(String name); Map<String, Integer> getStore(); CounterStoreConnector copy(); }
CounterStoreConnector implements Connector { public Integer get(String name) throws IllegalStateException { if (!countersMap.containsKey(name)) { throw new IllegalStateException("Undefined counter: " + name); } return countersMap.get(name); } CounterStoreConnector(CounterDAO counterDAO, User user, Project project, List<Counter> counterList); @Override void reset(); @Override void dispose(); @Override void post(); void set(Long projectId, String name, Integer value); void incrementBy(Long projectId, String name, int incrementBy); Integer get(String name); boolean contains(String name); Map<String, Integer> getStore(); CounterStoreConnector copy();  }