LocatorClusterManagementService implements ClusterManagementService { @VisibleForTesting Class<?> getRuntimeClass(Class<?> configClass) { Type genericSuperclass = configClass.getGenericSuperclass(); if (genericSuperclass instanceof ParameterizedType) { return (Class<?>) ((ParameterizedType) genericSuperclass).getActualTypeArguments()[0]; } return null; } LocatorClusterManagementService(InternalCache cache,
      InternalConfigurationPersistenceService persistenceService); @VisibleForTesting  LocatorClusterManagementService(
      InternalCache cache,
      InternalConfigurationPersistenceService persistenceService,
      Map<Class, ConfigurationManager> managers,
      Map<Class, ConfigurationValidator> validators,
      MemberValidator memberValidator,
      CommonConfigurationValidator commonValidator,
      OperationManager operationManager); @Override ClusterManagementRealizationResult create(T config); @Override ClusterManagementRealizationResult delete(
      T config); @Override ClusterManagementRealizationResult update(
      T config); @Override ClusterManagementListResult<T, R> list(
      T filter); @Override ClusterManagementGetResult<T, R> get(
      T config); @Override ClusterManagementOperationResult<A, V> start(
      A op); @Override ClusterManagementListOperationsResult<A, V> list(
      A opType); @Override ClusterManagementOperationResult<A, V> get(
      A opType, String opId); @Override CompletableFuture<ClusterManagementOperationResult<A, V>> getFuture(
      A opType, String opId); boolean isConnected(); @Override void close(); @VisibleForTesting
  // the dlock service name used by the CMS
  static final String CMS_DLOCK_SERVICE_NAME; }
@Test public void getRuntimeClass() { assertSoftly(softly -> { softly.assertThat(service.getRuntimeClass(Region.class)).isEqualTo(RuntimeRegionInfo.class); softly.assertThat(service.hasRuntimeInfo(Region.class)).isTrue(); softly.assertThat(service.getRuntimeClass(Index.class)).isEqualTo(IndexInfo.class); softly.assertThat(service.hasRuntimeInfo(Index.class)).isTrue(); }); }