### Question:
VolatileSequencer implements Sequencer, VolatileSequencerMBean { synchronized public int get (String counterName, int add) { int i = 0; Integer I = (Integer) map.get (counterName); if (I != null) i = I; i += add; map.put (counterName, i); return i; } VolatileSequencer(); synchronized int get(String counterName, int add); int get(String counterName); synchronized int set(String counterName, int newValue); String[] getCounterNames();  }### Answer:
@Test public void testGet() throws Throwable { VolatileSequencer volatileSequencer = new VolatileSequencer(); volatileSequencer.get("abcdefghijklmnopqrstuvwxyz", 1); int result = volatileSequencer.get("abcdefghijklmnopqrstuvwxyz", -1); assertEquals(0, result, "result"); }
@Test public void testGet1() throws Throwable { VolatileSequencer volatileSequencer = new VolatileSequencer(); int add = volatileSequencer.get(" ", -1); int result = volatileSequencer.get(" ", 0); assertEquals(add, result, "result"); }
@Test public void testGet2() throws Throwable { VolatileSequencer volatileSequencer = new VolatileSequencer(); int result = volatileSequencer.get("testVolatileSequencerCounterName", 0); assertEquals(0, result, "result"); }
@Test public void testGet3() throws Throwable { VolatileSequencer volatileSequencer = new VolatileSequencer(); int result = volatileSequencer.get("testVolatileSequencerCounterName"); assertEquals(1, result, "result"); }