ClusterSingletonServiceGroupImpl extends ClusterSingletonServiceGroup<P, E, C> { @Override void registerService(final ClusterSingletonServiceRegistration reg) { final ClusterSingletonService service = verifyRegistration(reg); checkNotClosed(); checkState(initialized, "Service group %s is not initialized yet", identifier); LOG.debug("Adding service {} to service group {}", service, identifier); verify(members.add(reg)); markDirty(); if (!tryLock()) { LOG.debug("Service group {} delayed register of {}", identifier, reg); return; } reconcileState(); } ClusterSingletonServiceGroupImpl(final String identifier, final S entityOwnershipService, final E mainEntity,
            final E closeEntity, final Collection<ClusterSingletonServiceRegistration> services); @VisibleForTesting  ClusterSingletonServiceGroupImpl(final String identifier, final E mainEntity,
            final E closeEntity, final S entityOwnershipService); @Override String getIdentifier(); @Override String toString();  }
@Test(expected = IllegalStateException.class) public void tryToTakeLeaderForNotInitializedGroupTest() { singletonServiceGroup.registerService(firstReg); }