@Test
public void testAddMetricObserverWithCompositeRegistry() {

    LookoutRegistry reg = new LookoutRegistry(new LookoutConfig());
    LogObserver logObserver = new LogObserver();
    CompositeRegistry compositeRegistry = new CompositeRegistry(Clock.SYSTEM);
    compositeRegistry.add(reg);
    MetricObserverUtil.addMetricObservers(compositeRegistry, logObserver);
    Assert.assertTrue(reg.getMetricObservers().contains(logObserver));
}