@Override
    public void beforeMethod(final TargetAdviceObject target, final TargetAdviceMethod method, final Object[] args, final String pluginType) {
        switch (method.getName()) {
            case "channelActive":
                MetricsCollectorRegistry.<GaugeMetricsCollector>get(config, pluginType).inc();
                break;
            case "channelInactive":
                MetricsCollectorRegistry.<GaugeMetricsCollector>get(config, pluginType).dec();
                break;
            default:
                break;
        }
    }
@Test
    void assertCountCurrentConnections() {
        TargetAdviceObjectFixture targetObject = new TargetAdviceObjectFixture();
        advice.beforeMethod(targetObject, mockMethod("channelActive"), new Object[]{}, "FIXTURE");
        advice.beforeMethod(targetObject, mockMethod("channelActive"), new Object[]{}, "FIXTURE");
        advice.beforeMethod(targetObject, mockMethod("channelInactive"), new Object[]{}, "FIXTURE");
        assertThat(MetricsCollectorRegistry.get(config, "FIXTURE").toString(), is("1"));
    }