public void testGetAfterRemoveReturnsNull() { final String testKey = "hefty"; final Object testValue = new Object(); context.put(testKey, testValue); context.remove(testKey); assertNull("remove() should result in null value for get()", context.get(testKey)); }
@Override public void run() { EventMetricCollector collector = timer.getCollector(); for (int i = 1; i < 30; i++) { try { context.put("Name", randomName()); context.put("Company", randomCompany()); collector.startTiming(this, action); doJob(i); collector.pauseForForward(); collector.startTiming(this, "frog"); collector.stopTiming(); collector.resumeAfterForward(); collector.stopTiming(); context.remove("Name"); context.remove("Company"); } catch (Exception e) { throw new RuntimeException(e); } } }