@Test
@InSequence(4)
public void removeCounterFromRegistry() {

    Counter counter = registry.getCounter(counterMetricID);
    assertThat("Counter is not registered correctly", counter, notNullValue());
    // Remove the counter from metrics registry
    registry.remove(counterMetricID);
    try {
        // Call the counted method and assert an exception is thrown
        bean.countedMethod(new Callable<Long>() {
            @Override
            public Long call() throws Exception {
                return null;
            }
        });
    }
    catch (Exception cause) {
        assertThat(cause, is(Matchers.<Exception>instanceOf(IllegalStateException.class)));
        // Make sure that the counter hasn't been called
        assertThat("Counter count is incorrect", counter.getCount(), is(equalTo(COUNTER_COUNT.get())));
        return;
    }
    fail("No exception has been re-thrown!");
}