@Test
public void testAddMetricObservers() throws InterruptedException {

    registry.addMetricObserver(new MetricObserver() {
        @Override
        public void update(List measures, Map metadata) {
            System.out.println("===>2");
        }
        @Override
        public boolean isEnable() {
            return true;
        }
    });
    try {
        Field field = registry.getClass().getDeclaredField("metricObserverComposite");
        field.setAccessible(true);
        MetricObserverComposite metricObserverComposite = (MetricObserverComposite) field
            .get(registry);
        //do assert
        Assert.assertTrue(metricObserverComposite.size() > 1);
    } catch (Throwable e) {
        throw new RuntimeException("xx", e);
    }
}