### Question:
LeaseRenewer { static LeaseRenewer getInstance(final String authority, final UserGroupInformation ugi, final DFSClient dfsc) throws IOException { final LeaseRenewer r = Factory.INSTANCE.get(authority, ugi); r.addClient(dfsc); return r; } private  LeaseRenewer(Factory.Key factorykey); @Override String toString();  }### Answer:
@Test public void testInstanceSharing() throws IOException { LeaseRenewer lr = LeaseRenewer.getInstance( FAKE_AUTHORITY, FAKE_UGI_A, MOCK_DFSCLIENT); LeaseRenewer lr2 = LeaseRenewer.getInstance( FAKE_AUTHORITY, FAKE_UGI_A, MOCK_DFSCLIENT); Assert.assertSame(lr, lr2); LeaseRenewer lr3 = LeaseRenewer.getInstance( FAKE_AUTHORITY, FAKE_UGI_B, MOCK_DFSCLIENT); Assert.assertNotSame(lr, lr3); LeaseRenewer lr4 = LeaseRenewer.getInstance( "someOtherAuthority", FAKE_UGI_B, MOCK_DFSCLIENT); Assert.assertNotSame(lr, lr4); Assert.assertNotSame(lr3, lr4); }