Counter { public synchronized long getValue() { return value; } Counter(int startValue); synchronized long decrease(); synchronized long decrease(long amount); synchronized long increase(); synchronized long increase(long amount); synchronized void clear(); synchronized long getValue(); synchronized void setValue(long newValue);  }
@Test public void testGetValue() throws Exception { Counter c = new Counter(15); assertEquals(15, c.getValue()); }