@Test(expected=RuntimeException.class) public void testGetInstanceNoHadoopCompat() throws Exception { //This should throw an exception because there is no compat lib on the class path. CompatibilitySingletonFactory.getInstance(MetricsReplicationSource.class); }
@Test public void testGetInstance() throws Exception { MetricsReplicationSource rms = CompatibilitySingletonFactory .getInstance(MetricsReplicationSource.class); assertTrue(rms instanceof MetricsReplicationSourceImpl); }
public MetricsSink() { rms = CompatibilitySingletonFactory.getInstance(MetricsReplicationSource.class); }