@Test public void sameLinkToObjectTest() { PipelinesConfig pc = new PipelinesConfig(); WsConfig wc = new WsConfig(); wc.setWsUrl("https: pc.setGbifApi(wc); SerializableSupplier<MetadataServiceClient> supplierOne = MetadataServiceClientFactory.getInstanceSupplier(pc); SerializableSupplier<MetadataServiceClient> supplierTwo = MetadataServiceClientFactory.getInstanceSupplier(pc); Assert.assertSame(supplierOne.get(), supplierTwo.get()); }
public static SerializableSupplier<MetadataServiceClient> getInstanceSupplier( PipelinesConfig config) { return () -> getInstance(config); }
MetadataServiceClientFactory { public static SerializableSupplier<MetadataServiceClient> getInstanceSupplier( PipelinesConfig config) { return () -> getInstance(config); } }
MetadataServiceClientFactory { public static SerializableSupplier<MetadataServiceClient> getInstanceSupplier( PipelinesConfig config) { return () -> getInstance(config); } @SneakyThrows private  MetadataServiceClientFactory(PipelinesConfig config); }
MetadataServiceClientFactory { public static SerializableSupplier<MetadataServiceClient> getInstanceSupplier( PipelinesConfig config) { return () -> getInstance(config); } @SneakyThrows private  MetadataServiceClientFactory(PipelinesConfig config); static MetadataServiceClient getInstance(PipelinesConfig config); static SerializableSupplier<MetadataServiceClient> createSupplier(PipelinesConfig config); static SerializableSupplier<MetadataServiceClient> getInstanceSupplier(
      PipelinesConfig config); }
MetadataServiceClientFactory { public static SerializableSupplier<MetadataServiceClient> getInstanceSupplier( PipelinesConfig config) { return () -> getInstance(config); } @SneakyThrows private  MetadataServiceClientFactory(PipelinesConfig config); static MetadataServiceClient getInstance(PipelinesConfig config); static SerializableSupplier<MetadataServiceClient> createSupplier(PipelinesConfig config); static SerializableSupplier<MetadataServiceClient> getInstanceSupplier(
      PipelinesConfig config);  }