### Question:
DefaultMetaStoreClientSupplier implements Supplier<CloseableMetaStoreClient> { @Override public CloseableMetaStoreClient get() { return metaStoreClientFactory.newInstance(hiveConf, "shunting-yard"); } DefaultMetaStoreClientSupplier(HiveConf hiveConf, MetaStoreClientFactory metaStoreClientFactory); @Override CloseableMetaStoreClient get();  }### Answer:
@Test public void get() { when(metaStoreClientFactory.newInstance(eq(hiveConf), anyString())).thenReturn(metaStoreClient); assertThat(supplier.get()).isSameAs(metaStoreClient); }
@Test(expected = NullPointerException.class) public void bubbleUpExceptions() { when(metaStoreClientFactory.newInstance(eq(hiveConf), anyString())).thenThrow(NullPointerException.class); supplier.get(); }