@Override
    public void removeEndpoints(String uid) {
        checkArgument(!Strings.isNullOrEmpty(uid), ERR_NULL_ENDPOINTS_UID);

        synchronized (this) {
            if (isEndpointsInUse(uid)) {
                final String error = String.format(MSG_ENDPOINTS, uid, ERR_IN_USE);
                throw new IllegalStateException(error);
            }

            Endpoints endpoints = k8sEndpointsStore.removeEndpoints(uid);

            if (endpoints != null) {
                log.info(String.format(MSG_ENDPOINTS,
                        endpoints.getMetadata().getName(), MSG_REMOVED));
            }
        }
    }
@Test(expected = IllegalArgumentException.class)
    public void testRemoveEndpointsWithNull() {
        target.removeEndpoints(null);
    }