MultiThreadedClientServiceCache implements ServiceCache<S> { @Override public void checkIn(ServiceHandle<S> handle) throws Exception { checkNotNull(handle); } MultiThreadedClientServiceCache(MultiThreadedServiceFactory<S> serviceFactory, MetricRegistry metricRegistry); @VisibleForTesting  MultiThreadedClientServiceCache(MultiThreadedServiceFactory<S> serviceFactory, ScheduledExecutorService executor,
                                    int evictionDelayInSeconds, int cleanUpDelayInSeconds, MetricRegistry metricRegistry); @Override void checkIn(ServiceHandle<S> handle); @Override ServiceHandle<S> checkOut(ServiceEndPoint endPoint); @Override void register(ServiceEndPoint endPoint); @Override synchronized void evict(ServiceEndPoint endPoint); @Override synchronized void close(); @Override int getNumIdleInstances(ServiceEndPoint endPoint); @Override int getNumActiveInstances(ServiceEndPoint endPoint);  }
@Test (expected = NullPointerException.class) public void testCheckInNullHandle() throws Exception { newCache().checkIn(null); }
@Test (expected = NullPointerException.class) public void testCheckInToNullEndPoint() throws Exception { Service service = mock(Service.class); ServiceHandle<Service> handle = new ServiceHandle<>(service, null); newCache().checkIn(handle); }
@Test (expected = NullPointerException.class) public void testCheckInNullServiceInstance() throws Exception { ServiceHandle<Service> handle = new ServiceHandle<>(null, _endPoint); newCache().checkIn(handle); }