OpenMonFactory { public OpenMon getFirstInstance() { OpenMon openMon = Utils.createFirst(METRICS, JAMON, JAVA_SIMON, STATSD, MICROMETER, NEW_RELIC); if (openMon == null) { return defaultOpenMon; } return openMon; } OpenMonFactory(OpenMon defaultOpenMon); void add(String... classNames); OpenMon getInstance(String key); OpenMon getFirstInstance(); String toString(); static final String JAMON; static final String JAVA_SIMON; static final String METRICS; static final String SYSOUT; static final String NULL_IMP; static final String NEW_RELIC; static final String STATSD; static final String MICROMETER; }
@Test public void testGetFirstInstance() throws Exception { assertThat(factory.getFirstInstance()).isNotNull(); assertThat(factory.getFirstInstance()).isNotEqualTo(defaultValue); }