summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--integrity-monitor/pom.xml198
-rw-r--r--integrity-monitor/src/main/java/org/onap/policy/common/im/IntegrityMonitor.java1064
-rw-r--r--integrity-monitor/src/main/java/org/onap/policy/common/im/StateManagement.java55
-rw-r--r--integrity-monitor/src/main/java/org/onap/policy/common/im/StateTransition.java69
-rw-r--r--integrity-monitor/src/test/java/org/onap/policy/common/im/AllSeemsWellTest.java67
-rw-r--r--integrity-monitor/src/test/java/org/onap/policy/common/im/ExceptionsTest.java24
-rw-r--r--integrity-monitor/src/test/java/org/onap/policy/common/im/IntegrityMonitorTest.java222
-rw-r--r--integrity-monitor/src/test/java/org/onap/policy/common/im/IntegrityMonitorTestBase.java88
-rw-r--r--integrity-monitor/src/test/java/org/onap/policy/common/im/StateManagementEntityTest.java50
-rw-r--r--integrity-monitor/src/test/java/org/onap/policy/common/im/StateManagementTest.java64
-rw-r--r--integrity-monitor/src/test/java/org/onap/policy/common/im/StateTransitionTest.java3278
-rw-r--r--integrity-monitor/src/test/java/org/onap/policy/common/im/exceptions/EntityRetrievalExceptionTest.java7
12 files changed, 2563 insertions, 2623 deletions
diff --git a/integrity-monitor/pom.xml b/integrity-monitor/pom.xml
index f3d3db3f..3d8c9bc8 100644
--- a/integrity-monitor/pom.xml
+++ b/integrity-monitor/pom.xml
@@ -2,14 +2,14 @@
============LICENSE_START=======================================================
ONAP Policy Engine - Common Modules
================================================================================
- Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-
+
http://www.apache.org/licenses/LICENSE-2.0
-
+
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -18,107 +18,113 @@
============LICENSE_END=========================================================
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
- <modelVersion>4.0.0</modelVersion>
+ <artifactId>integrity-monitor</artifactId>
- <artifactId>integrity-monitor</artifactId>
+ <packaging>jar</packaging>
- <packaging>jar</packaging>
+ <parent>
+ <groupId>org.onap.policy.common</groupId>
+ <artifactId>common-modules</artifactId>
+ <version>1.5.1-SNAPSHOT</version>
+ </parent>
- <parent>
- <groupId>org.onap.policy.common</groupId>
- <artifactId>common-modules</artifactId>
- <version>1.5.1-SNAPSHOT</version>
- </parent>
+ <name>Integrity Monitor</name>
- <name>Integrity Monitor</name>
-
- <dependencies>
- <dependency>
+ <dependencies>
+ <dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- </dependency>
- <dependency>
- <groupId>com.h2database</groupId>
- <artifactId>h2</artifactId>
- </dependency>
- <dependency>
- <groupId>org.eclipse.persistence</groupId>
- <artifactId>javax.persistence</artifactId>
- </dependency>
- <dependency>
- <groupId>org.eclipse.persistence</groupId>
- <artifactId>eclipselink</artifactId>
- </dependency>
- <dependency>
- <groupId>org.onap.policy.common</groupId>
- <artifactId>utils</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.policy.common</groupId>
- <artifactId>utils-test</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.onap.policy.common</groupId>
- <artifactId>ONAP-Logging</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>1.1.3</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.h2database</groupId>
+ <artifactId>h2</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.persistence</groupId>
+ <artifactId>javax.persistence</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.persistence</groupId>
+ <artifactId>eclipselink</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.policy.common</groupId>
+ <artifactId>utils</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.policy.common</groupId>
+ <artifactId>utils-test</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.assertj</groupId>
+ <artifactId>assertj-core</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.policy.common</groupId>
+ <artifactId>ONAP-Logging</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.1.3</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
- <build>
- <pluginManagement>
- <plugins>
- <!--This plugin's configuration is used to store Eclipse m2e settings
- only. It has no influence on the Maven build itself. -->
- <plugin>
- <groupId>org.eclipse.m2e</groupId>
- <artifactId>lifecycle-mapping</artifactId>
- <version>1.0.0</version>
- <configuration>
- <lifecycleMappingMetadata>
- <pluginExecutions>
- <pluginExecution>
- <pluginExecutionFilter>
- <groupId>org.jacoco</groupId>
- <artifactId>
- jacoco-maven-plugin
- </artifactId>
- <versionRange>
- [0.7.1.201405082137,)
- </versionRange>
- <goals>
- <goal>prepare-agent</goal>
- </goals>
- </pluginExecutionFilter>
- <action>
- <ignore />
- </action>
- </pluginExecution>
- </pluginExecutions>
- </lifecycleMappingMetadata>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <!--This plugin's configuration is used to store Eclipse m2e settings
+ only. It has no influence on the Maven build itself. -->
+ <plugin>
+ <groupId>org.eclipse.m2e</groupId>
+ <artifactId>lifecycle-mapping</artifactId>
+ <version>1.0.0</version>
+ <configuration>
+ <lifecycleMappingMetadata>
+ <pluginExecutions>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.jacoco</groupId>
+ <artifactId>
+ jacoco-maven-plugin
+ </artifactId>
+ <versionRange>
+ [0.7.1.201405082137,)
+ </versionRange>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore />
+ </action>
+ </pluginExecution>
+ </pluginExecutions>
+ </lifecycleMappingMetadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
</project>
diff --git a/integrity-monitor/src/main/java/org/onap/policy/common/im/IntegrityMonitor.java b/integrity-monitor/src/main/java/org/onap/policy/common/im/IntegrityMonitor.java
index 9801b530..68334e83 100644
--- a/integrity-monitor/src/main/java/org/onap/policy/common/im/IntegrityMonitor.java
+++ b/integrity-monitor/src/main/java/org/onap/policy/common/im/IntegrityMonitor.java
@@ -1,8 +1,8 @@
-/*
+/*-
* ============LICENSE_START=======================================================
* Integrity Monitor
* ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,6 +29,7 @@ import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Properties;
+import java.util.function.Consumer;
import javax.management.JMX;
import javax.management.MBeanServerConnection;
import javax.persistence.EntityManager;
@@ -38,6 +39,7 @@ import javax.persistence.FlushModeType;
import javax.persistence.LockModeType;
import javax.persistence.Persistence;
import javax.persistence.Query;
+import org.apache.commons.lang3.StringUtils;
import org.onap.policy.common.im.jmx.ComponentAdmin;
import org.onap.policy.common.im.jmx.ComponentAdminMBean;
import org.onap.policy.common.im.jmx.JmxAgentConnection;
@@ -95,7 +97,10 @@ public class IntegrityMonitor {
private StateManagement stateManager = null;
- private FpManager fpManager = null;
+ /**
+ * Set to {@code null} if to stop running.
+ */
+ private volatile Thread fpManager = null;
// The forward progress counter is incremented as the
// process being monitored makes forward progress
@@ -226,7 +231,7 @@ public class IntegrityMonitor {
// Did it get created?
//
if (emf == null) {
- logger.error("Error creating IM entity manager factory with persistence unit: {}",
+ logger.error("Error creating IM entity manager factory with persistence unit: {}",
getPersistenceUnit());
throw new IntegrityMonitorException("Unable to create IM Entity Manager Factory");
}
@@ -343,7 +348,10 @@ public class IntegrityMonitor {
logger.error("ComponentAdmin constructor exception: {}", e.toString(), e);
}
- fpManager = new FpManager();
+ // set now as the last time the refreshStateAudit ran
+ IntegrityMonitor.this.refreshStateAuditLastRunDate = MonitorTime.getInstance().getDate();
+
+ fpManager = new Thread(this::runFpManager);
fpManager.start();
}
@@ -399,11 +407,11 @@ public class IntegrityMonitor {
public static void deleteInstance() throws IntegrityMonitorException {
logger.debug("deleteInstance() called");
synchronized (getInstanceLock) {
- if (isUnitTesting() && instance != null && instance.getFpManager() != null) {
- FpManager fpm = instance.getFpManager();
-
+ if (isUnitTesting() && instance != null && instance.fpManager != null) {
// Stop the FPManager thread
- fpm.stopAndExit();
+ Thread fpm = instance.fpManager;
+ instance.fpManager = null;
+ fpm.interrupt();
try {
// Make sure it has exited
@@ -425,10 +433,6 @@ public class IntegrityMonitor {
logger.debug("deleteInstance() exit");
}
- private FpManager getFpManager() {
- return fpManager;
- }
-
private static String getJmxUrl() throws IntegrityMonitorException {
// get the jmx remote port and construct the JMX URL
@@ -598,66 +602,70 @@ public class IntegrityMonitor {
// verify that the ForwardProgress is current (check last_updated)
if (errorMsg == null) {
- if (forwardProgressEntity != null && stateManagementEntity != null) {
- Date date = MonitorTime.getInstance().getDate();
- long diffMs = date.getTime() - forwardProgressEntity.getLastUpdated().getTime();
- logger.debug("IntegrityMonitor.stateCheck(): diffMs = {}", diffMs);
+ checkForwardProgress(dep, forwardProgressEntity, stateManagementEntity);
+ }
- // Threshold for a stale entry
- long staleMs = maxFpcUpdateIntervalMs;
- logger.debug("IntegrityMonitor.stateCheck(): staleMs = {}", staleMs);
+ // check operation, admin and standby states of dependent resource
+ if (errorMsg == null) {
+ errorMsg = checkDependentStates(dep, stateManagementEntity);
+ }
- if (diffMs > staleMs) {
- // ForwardProgress is stale. Disable it
- try {
- if (!stateManagementEntity.getOpState().equals(StateManagement.DISABLED)) {
- logger.debug("IntegrityMonitor.stateCheck(): Changing OpStat = disabled for {}", dep);
- stateManager.disableFailed(dep);
- }
- } catch (Exception e) {
- String msg = STATE_CHECK_STRING + dep
- + "; " + e.getMessage();
- logger.error("{}", msg, e);
- }
- }
- } else {
+ String returnMsg = "IntegrityMonitor.stateCheck(): returned error_msg: " + errorMsg;
+ logger.debug("{}", returnMsg);
+ return errorMsg;
+ }
- if (forwardProgressEntity == null) {
- String msg = STATE_CHECK_STRING + dep
- + "; " + " forwardProgressEntity == null.";
- logger.error("{}", msg);
- } else {
- String msg = STATE_CHECK_STRING + dep
- + "; " + " stateManagementEntity == null.";
- logger.error("{}", msg);
- }
+ private void checkForwardProgress(String dep, ForwardProgressEntity forwardProgressEntity,
+ StateManagementEntity stateManagementEntity) {
+ if (forwardProgressEntity != null && stateManagementEntity != null) {
+ Date date = MonitorTime.getInstance().getDate();
+ long diffMs = date.getTime() - forwardProgressEntity.getLastUpdated().getTime();
+ logger.debug("IntegrityMonitor.stateCheck(): diffMs = {}", diffMs);
+
+ // Threshold for a stale entry
+ long staleMs = maxFpcUpdateIntervalMs;
+ logger.debug("IntegrityMonitor.stateCheck(): staleMs = {}", staleMs);
+
+ if (diffMs > staleMs) {
+ // ForwardProgress is stale. Disable it
+ disableEntity(dep, stateManagementEntity);
}
- }
+ } else {
- // check operation, admin and standby states of dependent resource
- if (errorMsg == null) {
- if (stateManagementEntity != null) {
- if ((stateManager.getAdminState() != null)
- && stateManagementEntity.getAdminState().equals(StateManagement.LOCKED)) {
- errorMsg = dep + ": resource is administratively locked";
- logger.error("{}", errorMsg);
- } else if ((stateManager.getOpState() != null)
- && stateManagementEntity.getOpState().equals(StateManagement.DISABLED)) {
- errorMsg = dep + ": resource is operationally disabled";
- logger.error("{}", errorMsg);
- } else if ((stateManager.getStandbyStatus() != null)
- && stateManagementEntity.getStandbyStatus().equals(StateManagement.COLD_STANDBY)) {
- errorMsg = dep + ": resource is cold standby";
- logger.error("{}", errorMsg);
- }
+ if (forwardProgressEntity == null) {
+ String msg = STATE_CHECK_STRING + dep
+ + "; " + " forwardProgressEntity == null.";
+ logger.error("{}", msg);
} else {
- errorMsg = dep + ": could not check standy state of resource. stateManagementEntity == null.";
+ String msg = STATE_CHECK_STRING + dep
+ + "; " + " stateManagementEntity == null.";
+ logger.error("{}", msg);
+ }
+ }
+ }
+
+ private String checkDependentStates(String dep, StateManagementEntity stateManagementEntity) {
+ String errorMsg = null;
+
+ if (stateManagementEntity != null) {
+ if ((stateManager.getAdminState() != null)
+ && stateManagementEntity.getAdminState().equals(StateManagement.LOCKED)) {
+ errorMsg = dep + ": resource is administratively locked";
+ logger.error("{}", errorMsg);
+ } else if ((stateManager.getOpState() != null)
+ && stateManagementEntity.getOpState().equals(StateManagement.DISABLED)) {
+ errorMsg = dep + ": resource is operationally disabled";
+ logger.error("{}", errorMsg);
+ } else if ((stateManager.getStandbyStatus() != null)
+ && stateManagementEntity.getStandbyStatus().equals(StateManagement.COLD_STANDBY)) {
+ errorMsg = dep + ": resource is cold standby";
logger.error("{}", errorMsg);
}
+ } else {
+ errorMsg = dep + ": could not check standy state of resource. stateManagementEntity == null.";
+ logger.error("{}", errorMsg);
}
- String returnMsg = "IntegrityMonitor.stateCheck(): returned error_msg: " + errorMsg;
- logger.debug("{}", returnMsg);
return errorMsg;
}
@@ -694,18 +702,7 @@ public class IntegrityMonitor {
if ((currTime - fpx.getLastUpdated().getTime()) > maxFpcUpdateIntervalMs) {
errorMsg = dep + ": FP count has not been updated in the last " + maxFpcUpdateIntervalMs + "ms";
logger.error("{}", errorMsg);
- try {
- // create instance of StateMangement class for dependent
- StateManagement depStateManager = new StateManagement(emf, dep);
- if (!depStateManager.getOpState().equals(StateManagement.DISABLED)) {
- logger.debug("Forward progress not detected for dependent resource {}. Setting dependent's "
- + "state to disable failed.", dep);
- depStateManager.disableFailed();
- }
- } catch (Exception e) {
- // ignore errors
- logger.error("Update dependent state failed with exception: ", e);
- }
+ disableEntity(dep);
}
} else {
// resource entry not found in FPC table
@@ -748,14 +745,12 @@ public class IntegrityMonitor {
et.commit();
}
logger.debug("getAllForwardProgressEntity: myList.size(): {}", myList.size());
- if (!myList.isEmpty()) {
- for (int i = 0; i < myList.size(); i++) {
- if (logger.isDebugEnabled()) {
- logger.debug("getAllForwardProgressEntity: myList.get({}).getResourceName(): {}", i,
- ((ForwardProgressEntity) myList.get(i)).getResourceName());
- }
- fpList.add((ForwardProgressEntity) myList.get(i));
+ for (int i = 0; i < myList.size(); i++) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("getAllForwardProgressEntity: myList.get({}).getResourceName(): {}", i,
+ ((ForwardProgressEntity) myList.get(i)).getResourceName());
}
+ fpList.add((ForwardProgressEntity) myList.get(i));
}
synchronized (imFlushLock) {
if (et.isActive()) {
@@ -856,171 +851,236 @@ public class IntegrityMonitor {
synchronized (dependencyCheckLock) {
// Start with the error message empty
- String errorMsg = "";
- boolean dependencyFailure = false;
+ StringBuilder errorMsg = new StringBuilder();
/*
* Before we check dependency groups we need to check subsystemTest.
*/
- try {
- // Test any subsystems that are not covered under the dependency
- // relationship
- subsystemTest();
- } catch (Exception e) {
- logger.error("IntegrityMonitor threw exception", e);
- dependencyFailure = true;
- // This indicates a subsystemTest failure
- try {
- if (logger.isDebugEnabled()) {
- logger.debug(
- "{}: There has been a subsystemTest failure with error:{} Updating this resource's "
- + "state to disableDependency",
- resourceName, e.getMessage());
- }
- // Capture the subsystemTest failure info
- if (!errorMsg.isEmpty()) {
- errorMsg = errorMsg.concat(",");
- }
- errorMsg = errorMsg.concat(resourceName + ": " + e.getMessage());
- this.stateManager.disableDependency();
- } catch (Exception ex) {
- logger.error(EXCEPTION_STRING, ex);
- if (!errorMsg.isEmpty()) {
- errorMsg = errorMsg.concat(",");
- }
- errorMsg = errorMsg.concat("\n" + resourceName
- + ": Failed to disable dependency after subsystemTest failure due to: " + ex.getMessage());
- }
- }
+ boolean dependencyOk = checkSubsystems(errorMsg);
// Check the sanity of dependents for lead subcomponents
if (depGroups != null && depGroups.length > 0) {
- // check state of resources in dependency groups
- for (String group : depGroups) {
- group = group.trim();
- if (group.isEmpty()) {
- // ignore empty group
- continue;
- }
- String[] dependencies = group.split(",");
- if (logger.isDebugEnabled()) {
- logger.debug("group dependencies = {}", Arrays.toString(dependencies));
- }
- int realDepCount = 0;
- int failDepCount = 0;
- for (String dep : dependencies) {
- dep = dep.trim();
- if (dep.isEmpty()) {
- // ignore empty dependency
- continue;
- }
- realDepCount++; // this is a valid dependency whose state is tracked
- // if a resource is down, its FP count will not be incremented
- String failMsg = fpCheck(dep);
- if (failMsg == null) {
- if (testViaJmx) {
- failMsg = jmxCheck(dep);
- } else {
- failMsg = stateCheck(dep);
- }
- }
- if (failMsg != null) {
- failDepCount++;
- if (!errorMsg.isEmpty()) {
- errorMsg = errorMsg.concat(", ");
- }
- errorMsg = errorMsg.concat(failMsg);
- }
- } // end for (String dep : dependencies)
-
- // if all dependencies in a group are failed, set this
- // resource's state to disable dependency
- if ((realDepCount > 0) && (failDepCount == realDepCount)) {
- dependencyFailure = true;
- try {
- logger.debug("All dependents in group {} have failed their health check. Updating this "
- + "resource's state to disableDependency", group);
- if (stateManager.getAvailStatus() == null || !((stateManager.getAvailStatus())
- .equals(StateManagement.DEPENDENCY)
- || (stateManager.getAvailStatus()).equals(StateManagement.DEPENDENCY_FAILED))) {
- // Note: redundant calls are made by
- // refreshStateAudit
- this.stateManager.disableDependency();
- }
- } catch (Exception e) {
- logger.error(EXCEPTION_STRING, e);
- if (!errorMsg.isEmpty()) {
- errorMsg = errorMsg.concat(",");
- }
- errorMsg = errorMsg.concat(resourceName + ": Failed to disable dependency");
- break; // break out on failure and skip checking other groups
- }
- }
- // check the next group
-
- } // end for (String group : depGroups)
+ dependencyOk = checkDependencies(errorMsg) && dependencyOk;
/*
* We have checked all the dependency groups. If all are ok and subsystemTest
* passed, dependencyFailure == false
*/
- if (!dependencyFailure) {
- try {
- logger.debug(
- "All dependency groups have at least one viable member. Updating this resource's state"
- + " to enableNoDependency");
- if (stateManager.getAvailStatus() != null
- && ((stateManager.getAvailStatus()).equals(StateManagement.DEPENDENCY)
- || (stateManager.getAvailStatus()).equals(StateManagement.DEPENDENCY_FAILED))) {
- // Note: redundant calls are made by
- // refreshStateAudit
- this.stateManager.enableNoDependency();
- }
- // The refreshStateAudit will catch the case where it is disabled but
- // availStatus != failed
- } catch (Exception e) {
- logger.error(EXCEPTION_STRING, e);
- if (!errorMsg.isEmpty()) {
- errorMsg = errorMsg.concat(",");
- }
- errorMsg = errorMsg.concat(resourceName + ": Failed to enable no dependency");
- }
+ if (dependencyOk) {
+ dependenciesGood(errorMsg);
}
- } else if (!dependencyFailure) {
+ } else if (dependencyOk) {
/*
* This is put here to clean up when no dependency group should exist, but one was
* erroneously added which caused the state to be disabled/dependency/coldstandby
* and later removed. We saw this happen in the lab, but is not very likely in a
* production environment...but you never know.
*/
- try {
- logger.debug("There are no dependents. Updating this resource's state to enableNoDependency");
- if (stateManager.getAvailStatus() != null
- && ((stateManager.getAvailStatus()).equals(StateManagement.DEPENDENCY)
- || (stateManager.getAvailStatus()).equals(StateManagement.DEPENDENCY_FAILED))) {
- // Note: redundant calls are made by refreshStateAudit
- this.stateManager.enableNoDependency();
- }
- // The refreshStateAudit will catch the case where it is disabled but
- // availStatus != failed
- } catch (Exception e) {
- logger.error(EXCEPTION_STRING, e);
- if (!errorMsg.isEmpty()) {
- errorMsg = errorMsg.concat(",");
- }
- errorMsg = errorMsg.concat(resourceName + ": Failed to enable no dependency");
- }
+ noDependencyGroups(errorMsg);
}
- if (!errorMsg.isEmpty()) {
+ dependencyCheckErrorMsg = errorMsg.toString();
+ lastDependencyCheckTime = MonitorTime.getInstance().getMillis();
+
+ if (!dependencyCheckErrorMsg.isEmpty()) {
logger.error("Sanity failure detected in a dependent resource: {}", errorMsg);
}
- dependencyCheckErrorMsg = errorMsg;
- lastDependencyCheckTime = MonitorTime.getInstance().getMillis();
logger.debug("dependencyCheck: exit");
- return errorMsg;
+ return dependencyCheckErrorMsg;
+ }
+ }
+
+ /**
+ * Checks the subsystems.
+ *
+ * @param errorMsg error messages are appended to this
+ * @return {@code true} if the test succeeds, {@code false} otherwise
+ */
+ private boolean checkSubsystems(StringBuilder errorMsg) {
+ try {
+ // Test any subsystems that are not covered under the dependency
+ // relationship
+ subsystemTest();
+ return true;
+
+ } catch (Exception e) {
+ logger.error("IntegrityMonitor threw exception", e);
+ // This indicates a subsystemTest failure
+ try {
+ if (logger.isDebugEnabled()) {
+ logger.debug(
+ "{}: There has been a subsystemTest failure with error:{} Updating this resource's "
+ + "state to disableDependency",
+ resourceName, e.getMessage());
+ }
+ // Capture the subsystemTest failure info
+ appendSeparator(errorMsg);
+ errorMsg.append(resourceName);
+ errorMsg.append(": ");
+ errorMsg.append(e.getMessage());
+ this.stateManager.disableDependency();
+ } catch (Exception ex) {
+ logger.error(EXCEPTION_STRING, ex);
+ appendSeparator(errorMsg);
+ errorMsg.append('\n');
+ errorMsg.append(resourceName);
+ errorMsg.append(": Failed to disable dependency after subsystemTest failure due to: ");
+ errorMsg.append(ex.getMessage());
+ }
+
+ return false;
+ }
+ }
+
+ /**
+ * Checks the dependencies.
+ *
+ * @param errorMsg error messages are appended to this
+ * @return {@code true} if the dependencies are OK, {@code false} otherwise
+ */
+ private boolean checkDependencies(StringBuilder errorMsg) {
+ boolean dependencyOk = true;
+
+ // check state of resources in dependency groups
+ for (String group : depGroups) {
+ group = group.trim();
+ if (group.isEmpty()) {
+ // ignore empty group
+ continue;
+ }
+ String[] dependencies = group.split(",");
+ if (logger.isDebugEnabled()) {
+ logger.debug("group dependencies = {}", Arrays.toString(dependencies));
+ }
+ int realDepCount = 0;
+ int failDepCount = 0;
+ for (String dep : dependencies) {
+ dep = dep.trim();
+ if (dep.isEmpty()) {
+ // ignore empty dependency
+ continue;
+ }
+ realDepCount++; // this is a valid dependency whose state is tracked
+ // if a resource is down, its FP count will not be incremented
+ String failMsg = doDependencyChecks(dep);
+ if (failMsg != null) {
+ failDepCount++;
+ appendSeparator(errorMsg);
+ errorMsg.append(failMsg);
+ }
+ } // end for (String dep : dependencies)
+
+ // if all dependencies in a group are failed, set this
+ // resource's state to disable dependency
+ if ((realDepCount > 0) && (failDepCount == realDepCount)) {
+ dependencyOk = false;
+ if (!disableDependency(errorMsg, group)) {
+ break; // break out on failure and skip checking other groups
+ }
+ }
+ // check the next group
+
+ } // end for (String group : depGroups)
+
+ return dependencyOk;
+ }
+
+ /**
+ * Checks a single dependency.
+ *
+ * @param dep dependency to be checked
+ * @return the failure message, or {@code null} if all checks passed
+ */
+ private String doDependencyChecks(String dep) {
+ String failMsg = fpCheck(dep);
+
+ if (failMsg == null) {
+ if (testViaJmx) {
+ failMsg = jmxCheck(dep);
+ } else {
+ failMsg = stateCheck(dep);
+ }
+ }
+
+ return failMsg;
+ }
+
+ /**
+ * Disables the dependency group.
+ *
+ * @param errorMsg error messages are appended to this
+ * @param group group of interest
+ * @return {@code true} if it was successfully disabled, {@code false} otherwise
+ */
+ private boolean disableDependency(StringBuilder errorMsg, String group) {
+ try {
+ logger.debug("All dependents in group {} have failed their health check. Updating this "
+ + "resource's state to disableDependency", group);
+ if (stateManager.getAvailStatus() == null || !((stateManager.getAvailStatus())
+ .equals(StateManagement.DEPENDENCY)
+ || (stateManager.getAvailStatus()).equals(StateManagement.DEPENDENCY_FAILED))) {
+ // Note: redundant calls are made by
+ // refreshStateAudit
+ this.stateManager.disableDependency();
+ }
+
+ return true;
+
+ } catch (Exception e) {
+ logger.error(EXCEPTION_STRING, e);
+ appendSeparator(errorMsg);
+ errorMsg.append(resourceName);
+ errorMsg.append(": Failed to disable dependency");
+ return false;
+ }
+ }
+
+ private void dependenciesGood(StringBuilder errorMsg) {
+ try {
+ logger.debug(
+ "All dependency groups have at least one viable member. Updating this resource's state"
+ + " to enableNoDependency");
+ if (stateManager.getAvailStatus() != null
+ && ((stateManager.getAvailStatus()).equals(StateManagement.DEPENDENCY)
+ || (stateManager.getAvailStatus()).equals(StateManagement.DEPENDENCY_FAILED))) {
+ // Note: redundant calls are made by
+ // refreshStateAudit
+ this.stateManager.enableNoDependency();
+ }
+ // The refreshStateAudit will catch the case where it is disabled but
+ // availStatus != failed
+ } catch (Exception e) {
+ logger.error(EXCEPTION_STRING, e);
+ appendSeparator(errorMsg);
+ errorMsg.append(resourceName);
+ errorMsg.append(": Failed to enable no dependency");
+ }
+ }
+
+ private void noDependencyGroups(StringBuilder errorMsg) {
+ try {
+ logger.debug("There are no dependents. Updating this resource's state to enableNoDependency");
+ if (stateManager.getAvailStatus() != null
+ && ((stateManager.getAvailStatus()).equals(StateManagement.DEPENDENCY)
+ || (stateManager.getAvailStatus()).equals(StateManagement.DEPENDENCY_FAILED))) {
+ // Note: redundant calls are made by refreshStateAudit
+ this.stateManager.enableNoDependency();
+ }
+ // The refreshStateAudit will catch the case where it is disabled but
+ // availStatus != failed
+ } catch (Exception e) {
+ logger.error(EXCEPTION_STRING, e);
+ appendSeparator(errorMsg);
+ errorMsg.append(resourceName);
+ errorMsg.append(": Failed to enable no dependency");
+ }
+ }
+
+ private void appendSeparator(StringBuilder errorMsg) {
+ if (errorMsg.length() != 0) {
+ errorMsg.append(',');
}
}
@@ -1044,6 +1104,8 @@ public class IntegrityMonitor {
/**
* Additional testing for subsystems that do not have a /test interface (for ex. 3rd party processes like elk). This
* method would be overridden by the subsystem.
+ *
+ * @throws IntegrityMonitorException if an error occurs
*/
public void subsystemTest() throws IntegrityMonitorException {
// Testing provided by subsystem
@@ -1053,10 +1115,9 @@ public class IntegrityMonitor {
/**
* Checks admin state and resets transaction timer. Called by application at the start of a transaction.
*
- * @throws AdministrativeStateException throws admin state exception if resource is locked
- * @throws StandbyStatusException if resource is in standby
+ * @throws IntegrityMonitorException if resource is locked or in standby
*/
- public void startTransaction() throws AdministrativeStateException, StandbyStatusException {
+ public void startTransaction() throws IntegrityMonitorException {
synchronized (startTransactionLock) {
// check admin state and throw exception if locked
@@ -1099,16 +1160,16 @@ public class IntegrityMonitor {
logger.error("endTransaction: allNotWellMap is NOT EMPTY. Not advancing forward"
+ "progress counter. \n{}\n", msg);
return;
- } else {
- if (logger.isDebugEnabled() && getAllSeemsWellMap() != null && !(getAllSeemsWellMap().isEmpty())) {
- String msg = "allSeemsWellMap:";
- for (Entry<String, String> entry : allSeemsWellMap.entrySet()) {
- msg = msg.concat("\nkey = " + entry.getKey() + " msg = " + entry.getValue());
- }
- logger.debug(
- "endTransaction: allNotWellMap IS EMPTY and allSeemsWellMap is NOT EMPTY. "
- + "Advancing forward progress counter. \n{}\n", msg);
+ }
+
+ if (logger.isDebugEnabled() && getAllSeemsWellMap() != null && !(getAllSeemsWellMap().isEmpty())) {
+ String msg = "allSeemsWellMap:";
+ for (Entry<String, String> entry : allSeemsWellMap.entrySet()) {
+ msg = msg.concat("\nkey = " + entry.getKey() + " msg = " + entry.getValue());
}
+ logger.debug(
+ "endTransaction: allNotWellMap IS EMPTY and allSeemsWellMap is NOT EMPTY. "
+ + "Advancing forward progress counter. \n{}\n", msg);
}
}
// increment local FPC
@@ -1181,155 +1242,109 @@ public class IntegrityMonitor {
*/
private static void validateProperties(Properties prop) throws IntegrityMonitorPropertiesException {
- if (prop.getProperty(IntegrityMonitorProperties.DB_DRIVER) == null) {
- String msg = IntegrityMonitorProperties.DB_DRIVER + NULL_PROPERTY_STRING;
- logger.error("{}", msg);
- throw new IntegrityMonitorPropertiesException(PROPERTY_EXCEPTION_STRING + msg);
- }
+ checkNonNull(prop, IntegrityMonitorProperties.DB_DRIVER);
+ checkNonNull(prop, IntegrityMonitorProperties.DB_URL);
+ checkNonNull(prop, IntegrityMonitorProperties.DB_USER);
+ checkNonNull(prop, IntegrityMonitorProperties.DB_PWD);
- if (prop.getProperty(IntegrityMonitorProperties.DB_URL) == null) {
- String msg = IntegrityMonitorProperties.DB_URL + NULL_PROPERTY_STRING;
- logger.error("{}", msg);
- throw new IntegrityMonitorPropertiesException(PROPERTY_EXCEPTION_STRING + msg);
- }
+ setLong(prop, IntegrityMonitorProperties.FP_MONITOR_INTERVAL,
+ value -> monitorIntervalMs = toMillis(value));
- if (prop.getProperty(IntegrityMonitorProperties.DB_USER) == null) {
- String msg = IntegrityMonitorProperties.DB_USER + NULL_PROPERTY_STRING;
- logger.error("{}", msg);
- throw new IntegrityMonitorPropertiesException(PROPERTY_EXCEPTION_STRING + msg);
- }
+ setInt(prop, IntegrityMonitorProperties.FAILED_COUNTER_THRESHOLD,
+ value -> failedCounterThreshold = value);
- if (prop.getProperty(IntegrityMonitorProperties.DB_PWD) == null) {
- String msg = IntegrityMonitorProperties.DB_PWD + NULL_PROPERTY_STRING;
- logger.error("{}", msg);
- throw new IntegrityMonitorPropertiesException(PROPERTY_EXCEPTION_STRING + msg);
- }
+ setLong(prop, IntegrityMonitorProperties.TEST_TRANS_INTERVAL,
+ value -> testTransIntervalMs = toMillis(value));
- if (prop.getProperty(IntegrityMonitorProperties.FP_MONITOR_INTERVAL) != null) {
- try {
- monitorIntervalMs = toMillis(
- Integer.parseInt(prop.getProperty(IntegrityMonitorProperties.FP_MONITOR_INTERVAL).trim()));
- } catch (NumberFormatException e) {
- logger.warn(IGNORE_INVALID_PROPERTY_STRING, IntegrityMonitorProperties.FP_MONITOR_INTERVAL, e);
- }
- }
+ setLong(prop, IntegrityMonitorProperties.WRITE_FPC_INTERVAL,
+ value -> writeFpcIntervalMs = toMillis(value));
- if (prop.getProperty(IntegrityMonitorProperties.FAILED_COUNTER_THRESHOLD) != null) {
- try {
- failedCounterThreshold =
- Integer.parseInt(prop.getProperty(IntegrityMonitorProperties.FAILED_COUNTER_THRESHOLD).trim());
- } catch (NumberFormatException e) {
- logger.warn(IGNORE_INVALID_PROPERTY_STRING, IntegrityMonitorProperties.FAILED_COUNTER_THRESHOLD, e);
- }
- }
-
- if (prop.getProperty(IntegrityMonitorProperties.TEST_TRANS_INTERVAL) != null) {
- try {
- testTransIntervalMs = toMillis(
- Integer.parseInt(prop.getProperty(IntegrityMonitorProperties.TEST_TRANS_INTERVAL).trim()));
- } catch (NumberFormatException e) {
- logger.warn(IGNORE_INVALID_PROPERTY_STRING, IntegrityMonitorProperties.TEST_TRANS_INTERVAL, e);
- }
- }
-
- if (prop.getProperty(IntegrityMonitorProperties.WRITE_FPC_INTERVAL) != null) {
- try {
- writeFpcIntervalMs = toMillis(
- Integer.parseInt(prop.getProperty(IntegrityMonitorProperties.WRITE_FPC_INTERVAL).trim()));
- } catch (NumberFormatException e) {
- logger.warn(IGNORE_INVALID_PROPERTY_STRING, IntegrityMonitorProperties.WRITE_FPC_INTERVAL, e);
- }
- }
-
- if (prop.getProperty(IntegrityMonitorProperties.CHECK_DEPENDENCY_INTERVAL) != null) {
- try {
- checkDependencyIntervalMs = toMillis(Integer
- .parseInt(prop.getProperty(IntegrityMonitorProperties.CHECK_DEPENDENCY_INTERVAL).trim()));
- } catch (NumberFormatException e) {
- logger.warn(IGNORE_INVALID_PROPERTY_STRING, IntegrityMonitorProperties.CHECK_DEPENDENCY_INTERVAL, e);
- }
- }
+ setLong(prop, IntegrityMonitorProperties.CHECK_DEPENDENCY_INTERVAL,
+ value -> checkDependencyIntervalMs = toMillis(value));
// dependency_groups are a semi-colon separated list of groups
// each group is a comma separated list of resource names
// For ex. dependency_groups = site_1.pap_1,site_1.pap_2 ; site_1.pdp_1,
// site_1.pdp_2
- if (prop.getProperty(IntegrityMonitorProperties.DEPENDENCY_GROUPS) != null) {
- try {
- depGroups = prop.getProperty(IntegrityMonitorProperties.DEPENDENCY_GROUPS).split(";");
- if (logger.isDebugEnabled()) {
- logger.debug("dependency groups property = {}", Arrays.toString(depGroups));
- }
- } catch (Exception e) {
- logger.warn(IGNORE_INVALID_PROPERTY_STRING, IntegrityMonitorProperties.DEPENDENCY_GROUPS, e);
+ String depGroupsValue = prop.getProperty(IntegrityMonitorProperties.DEPENDENCY_GROUPS);
+ if (!StringUtils.isBlank(depGroupsValue)) {
+ depGroups = depGroupsValue.split(";");
+ if (logger.isDebugEnabled()) {
+ logger.debug("dependency groups property = {}", Arrays.toString(depGroups));
}
}
- siteName = prop.getProperty(IntegrityMonitorProperties.SITE_NAME);
- if (siteName == null) {
- String msg = IntegrityMonitorProperties.SITE_NAME + NULL_PROPERTY_STRING;
+ siteName = checkNonNull(prop, IntegrityMonitorProperties.SITE_NAME);
+
+ nodeType = checkNonNull(prop, IntegrityMonitorProperties.NODE_TYPE);
+ if (!isNodeTypeEnum(nodeType)) {
+ String msg = IntegrityMonitorProperties.NODE_TYPE + " property " + nodeType + " is invalid";
logger.error("{}", msg);
throw new IntegrityMonitorPropertiesException(PROPERTY_EXCEPTION_STRING + msg);
- } else {
- siteName = siteName.trim();
}
- nodeType = prop.getProperty(IntegrityMonitorProperties.NODE_TYPE);
- if (nodeType == null) {
- String msg = IntegrityMonitorProperties.NODE_TYPE + NULL_PROPERTY_STRING;
+ setBoolean(prop, IntegrityMonitorProperties.TEST_VIA_JMX, value -> testViaJmx = value);
+
+ String jmxFqdnValue = prop.getProperty(IntegrityMonitorProperties.JMX_FQDN);
+ jmxFqdn = StringUtils.isBlank(jmxFqdnValue) ? null : jmxFqdnValue.trim();
+
+ setLong(prop, IntegrityMonitorProperties.MAX_FPC_UPDATE_INTERVAL,
+ value -> maxFpcUpdateIntervalMs = toMillis(value));
+
+ setLong(prop, IntegrityMonitorProperties.STATE_AUDIT_INTERVAL_MS,
+ value -> stateAuditIntervalMs = value);
+
+ setLong(prop, IntegrityMonitorProperties.REFRESH_STATE_AUDIT_INTERVAL_MS,
+ value -> refreshStateAuditIntervalMs = value);
+
+ logger.debug("IntegrityMonitor.validateProperties(): Property values \nmaxFpcUpdateIntervalMs = {}\n",
+ maxFpcUpdateIntervalMs);
+ }
+
+ private static void setBoolean(Properties props, String propName, Consumer<Boolean> setter) {
+ String propValue = props.getProperty(propName);
+ if (propValue != null) {
+ setter.accept(Boolean.parseBoolean(propValue.trim()));
+ }
+ }
+
+ private static String checkNonNull(Properties props, String propName)
+ throws IntegrityMonitorPropertiesException {
+
+ String propValue = props.getProperty(propName);
+ if (propValue == null) {
+ String msg = propName + NULL_PROPERTY_STRING;
logger.error("{}", msg);
throw new IntegrityMonitorPropertiesException(PROPERTY_EXCEPTION_STRING + msg);
- } else {
- nodeType = nodeType.trim();
- if (!isNodeTypeEnum(nodeType)) {
- String msg = IntegrityMonitorProperties.NODE_TYPE + " property " + nodeType + " is invalid";
- logger.error("{}", msg);
- throw new IntegrityMonitorPropertiesException(PROPERTY_EXCEPTION_STRING + msg);
- }
}
- if (prop.getProperty(IntegrityMonitorProperties.TEST_VIA_JMX) != null) {
- String jmxTest = prop.getProperty(IntegrityMonitorProperties.TEST_VIA_JMX).trim();
- testViaJmx = Boolean.parseBoolean(jmxTest);
- }
+ return propValue.trim();
+ }
- if (prop.getProperty(IntegrityMonitorProperties.JMX_FQDN) != null) {
- jmxFqdn = prop.getProperty(IntegrityMonitorProperties.JMX_FQDN).trim();
- if (jmxFqdn.isEmpty()) {
- jmxFqdn = null;
- }
+ private static void setInt(Properties props, String propName, Consumer<Integer> setter) {
+ String propValue = props.getProperty(propName);
+ if (StringUtils.isBlank(propValue)) {
+ return;
}
- if (prop.getProperty(IntegrityMonitorProperties.MAX_FPC_UPDATE_INTERVAL) != null) {
- try {
- maxFpcUpdateIntervalMs = toMillis(
- Integer.parseInt(prop.getProperty(IntegrityMonitorProperties.MAX_FPC_UPDATE_INTERVAL).trim()));
- } catch (NumberFormatException e) {
- logger.warn(IGNORE_INVALID_PROPERTY_STRING, IntegrityMonitorProperties.MAX_FPC_UPDATE_INTERVAL, e);
- }
+ try {
+ setter.accept(Integer.parseInt(propValue.trim()));
+ } catch (NumberFormatException e) {
+ logger.warn(IGNORE_INVALID_PROPERTY_STRING, propName, e);
}
+ }
- if (prop.getProperty(IntegrityMonitorProperties.STATE_AUDIT_INTERVAL_MS) != null) {
- try {
- stateAuditIntervalMs =
- Long.parseLong(prop.getProperty(IntegrityMonitorProperties.STATE_AUDIT_INTERVAL_MS));
- } catch (NumberFormatException e) {
- logger.warn(IGNORE_INVALID_PROPERTY_STRING, IntegrityMonitorProperties.STATE_AUDIT_INTERVAL_MS, e);
- }
+ private static void setLong(Properties props, String propName, Consumer<Long> setter) {
+ String propValue = props.getProperty(propName);
+ if (StringUtils.isBlank(propValue)) {
+ return;
}
- if (prop.getProperty(IntegrityMonitorProperties.REFRESH_STATE_AUDIT_INTERVAL_MS) != null) {
- try {
- refreshStateAuditIntervalMs =
- Long.parseLong(prop.getProperty(IntegrityMonitorProperties.REFRESH_STATE_AUDIT_INTERVAL_MS));
- } catch (NumberFormatException e) {
- logger.warn(IGNORE_INVALID_PROPERTY_STRING, IntegrityMonitorProperties.REFRESH_STATE_AUDIT_INTERVAL_MS,
- e);
- }
+ try {
+ setter.accept(Long.parseLong(propValue.trim()));
+ } catch (NumberFormatException e) {
+ logger.warn(IGNORE_INVALID_PROPERTY_STRING, propName, e);
}
-
- logger.debug("IntegrityMonitor.validateProperties(): Property values \nmaxFpcUpdateIntervalMs = {}\n",
- maxFpcUpdateIntervalMs);
}
/**
@@ -1383,33 +1398,10 @@ public class IntegrityMonitor {
try {
if (fpCounter == lastFpCounter) {
// no forward progress
- missedCycles += 1;
- if (missedCycles >= failedCounterThreshold && !alarmExists) {
- logger.debug("Forward progress not detected for resource {}. Setting state to disable failed.",
- resourceName);
- if (!(stateManager.getOpState()).equals(StateManagement.DISABLED)) {
- // Note: The refreshStateAudit will make redundant
- // calls
- stateManager.disableFailed();
- }
- // The refreshStateAudit will catch the case where opStat = disabled and
- // availState ! failed/dependency.failed
- alarmExists = true;
- }
+ noForwardProgress();
} else {
// forward progress has occurred
- lastFpCounter = fpCounter;
- missedCycles = 0;
- // set op state to enabled
- logger.debug("Forward progress detected for resource {}. Setting state to enable not failed.",
- resourceName);
- if (!(stateManager.getOpState()).equals(StateManagement.ENABLED)) {
- // Note: The refreshStateAudit will make redundant calls
- stateManager.enableNotFailed();
- }
- // The refreshStateAudit will catch the case where opState=enabled and
- // availStatus != null
- alarmExists = false;
+ forwardProgress();
}
} catch (Exception e) {
// log error
@@ -1419,6 +1411,37 @@ public class IntegrityMonitor {
logger.debug("fpMonitorCycle(): exit");
}
+ private void noForwardProgress() throws StateManagementException {
+ missedCycles += 1;
+ if (missedCycles >= failedCounterThreshold && !alarmExists) {
+ logger.debug("Forward progress not detected for resource {}. Setting state to disable failed.",
+ resourceName);
+ if (!(stateManager.getOpState()).equals(StateManagement.DISABLED)) {
+ // Note: The refreshStateAudit will make redundant
+ // calls
+ stateManager.disableFailed();
+ }
+ // The refreshStateAudit will catch the case where opStat = disabled and
+ // availState ! failed/dependency.failed
+ alarmExists = true;
+ }
+ }
+
+ private void forwardProgress() throws StateManagementException {
+ lastFpCounter = fpCounter;
+ missedCycles = 0;
+ // set op state to enabled
+ logger.debug("Forward progress detected for resource {}. Setting state to enable not failed.",
+ resourceName);
+ if (!(stateManager.getOpState()).equals(StateManagement.ENABLED)) {
+ // Note: The refreshStateAudit will make redundant calls
+ stateManager.enableNotFailed();
+ }
+ // The refreshStateAudit will catch the case where opState=enabled and
+ // availStatus != null
+ alarmExists = false;
+ }
+
/**
* Look for "Forward Progress" on other nodes. If they are not making forward progress, check their operational
* state. If it is not disabled, then disable them.
@@ -1498,58 +1521,10 @@ public class IntegrityMonitor {
fpe.getResourceName());
EntityTransaction et = em.getTransaction();
et.begin();
- StateManagementEntity sme = null;
- try {
- // query if StateManagement entry exists for fpe resource
- Query query =
- em.createQuery("Select p from StateManagementEntity p where p.resourceName=:resource");
- query.setParameter(LC_RESOURCE_STRING, fpe.getResourceName());
-
- @SuppressWarnings("rawtypes")
- List smList =
- query.setLockMode(LockModeType.NONE).setFlushMode(FlushModeType.COMMIT).getResultList();
- if (!smList.isEmpty()) {
- // exists
- sme = (StateManagementEntity) smList.get(0);
- // refresh the object from DB in case cached data was
- // returned
- em.refresh(sme);
- if (logger.isDebugEnabled()) {
- logger.debug(
- "IntegrityMonitor.executeStateAudit(): Found entry in StateManagementEntity table "
- + "for Resource={}",
- sme.getResourceName());
- }
- } else {
- String msg = "IntegrityMonitor.executeStateAudit(): " + fpe.getResourceName()
- + ": resource not found in state management entity database table";
- logger.error("{}", msg);
- }
- synchronized (imFlushLock) {
- et.commit();
- }
- } catch (Exception e) {
- // log an error
- logger.error("IntegrityMonitor.executeStateAudit(): {}: StateManagementEntity DB read failed with "
- + "exception: ", fpe.getResourceName(), e);
- synchronized (imFlushLock) {
- if (et.isActive()) {
- et.rollback();
- }
- }
- }
+ StateManagementEntity sme = disableEntity(et, fpe);
if (sme != null && !sme.getOpState().equals(StateManagement.DISABLED)) {
- if (logger.isDebugEnabled()) {
- logger.debug("IntegrityMonitor.executeStateAudit(): Changing OpStat = disabled for {}",
- sme.getResourceName());
- }
- try {
- stateManager.disableFailed(sme.getResourceName());
- } catch (Exception e) {
- String msg = "IntegrityMonitor.executeStateAudit(): Failed to disable " + sme.getResourceName();
- logger.error("{}", msg, e);
- }
+ disableFailed(sme);
}
} // end if(diffMs > staleMs)
} // end for(ForwardProgressEntity fpe : fpList)
@@ -1557,6 +1532,103 @@ public class IntegrityMonitor {
}
/**
+ * Disables the entity.
+ * @param entrans entity transaction
+ * @param fpe entity of interest
+ * @return the corresponding state management entity
+ */
+ private StateManagementEntity disableEntity(EntityTransaction entrans, ForwardProgressEntity fpe) {
+ StateManagementEntity sme = null;
+
+ try {
+ // query if StateManagement entry exists for fpe resource
+ Query query =
+ em.createQuery("Select p from StateManagementEntity p where p.resourceName=:resource");
+ query.setParameter(LC_RESOURCE_STRING, fpe.getResourceName());
+
+ @SuppressWarnings("rawtypes")
+ List smList =
+ query.setLockMode(LockModeType.NONE).setFlushMode(FlushModeType.COMMIT).getResultList();
+ if (!smList.isEmpty()) {
+ // exists
+ sme = (StateManagementEntity) smList.get(0);
+ // refresh the object from DB in case cached data was
+ // returned
+ em.refresh(sme);
+ if (logger.isDebugEnabled()) {
+ logger.debug(
+ "IntegrityMonitor.executeStateAudit(): Found entry in StateManagementEntity table "
+ + "for Resource={}",
+ sme.getResourceName());
+ }
+ } else {
+ String msg = "IntegrityMonitor.executeStateAudit(): " + fpe.getResourceName()
+ + ": resource not found in state management entity database table";
+ logger.error("{}", msg);
+ }
+ synchronized (imFlushLock) {
+ entrans.commit();
+ }
+ } catch (Exception e) {
+ // log an error
+ logger.error("IntegrityMonitor.executeStateAudit(): {}: StateManagementEntity DB read failed with "
+ + "exception: ", fpe.getResourceName(), e);
+ synchronized (imFlushLock) {
+ if (entrans.isActive()) {
+ entrans.rollback();
+ }
+ }
+ }
+
+ return sme;
+ }
+
+ private void disableEntity(String dep, StateManagementEntity sme) {
+ try {
+ if (!sme.getOpState().equals(StateManagement.DISABLED)) {
+ logger.debug("IntegrityMonitor.stateCheck(): Changing OpStat = disabled for {}", dep);
+ stateManager.disableFailed(dep);
+ }
+ } catch (Exception e) {
+ String msg = STATE_CHECK_STRING + dep
+ + "; " + e.getMessage();
+ logger.error("{}", msg, e);
+ }
+ }
+
+ private void disableEntity(String dep) {
+ try {
+ // create instance of StateMangement class for dependent
+ StateManagement depStateManager = new StateManagement(emf, dep);
+ if (!depStateManager.getOpState().equals(StateManagement.DISABLED)) {
+ logger.debug("Forward progress not detected for dependent resource {}. Setting dependent's "
+ + "state to disable failed.", dep);
+ depStateManager.disableFailed();
+ }
+ } catch (Exception e) {
+ // ignore errors
+ logger.error("Update dependent state failed with exception: ", e);
+ }
+ }
+
+ /**
+ * Indicates a failure to disable an entity.
+ * @param sme entity of interest
+ */
+ private void disableFailed(StateManagementEntity sme) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("IntegrityMonitor.executeStateAudit(): Changing OpStat = disabled for {}",
+ sme.getResourceName());
+ }
+ try {
+ stateManager.disableFailed(sme.getResourceName());
+ } catch (Exception e) {
+ String msg = "IntegrityMonitor.executeStateAudit(): Failed to disable " + sme.getResourceName();
+ logger.error("{}", msg, e);
+ }
+ }
+
+ /**
* Execute a test transaction when test transaction interval has elapsed.
*/
private void checkTestTransaction() {
@@ -1692,74 +1764,53 @@ public class IntegrityMonitor {
logger.debug("executeRefreshStateAudit(): exit");
}
- /**
- * The following nested class periodically performs the forward progress check, checks dependencies, does a refresh
- * state audit and runs the stateAudit.
- */
- class FpManager extends Thread {
-
- private volatile boolean stopRequested = false;
-
- // Constructor - start FP manager thread
- FpManager() {
- // set now as the last time the refreshStateAudit ran
- IntegrityMonitor.this.refreshStateAuditLastRunDate = MonitorTime.getInstance().getDate();
- }
-
- @Override
- public void run() {
- logger.debug("FPManager thread running");
+ private void runFpManager() {
+ logger.debug("FPManager thread running");
- try {
- runStarted();
+ try {
+ runStarted();
- while (!stopRequested) {
- MonitorTime.getInstance().sleep(CYCLE_INTERVAL_MILLIS);
-
- runOnce();
- monitorCompleted();
- }
+ while (fpManager != null) {
+ MonitorTime.getInstance().sleep(CYCLE_INTERVAL_MILLIS);
- } catch (InterruptedException e) {
- logger.debug(EXCEPTION_STRING, e);
- Thread.currentThread().interrupt();
+ runOnce();
+ monitorCompleted();
}
- }
- void stopAndExit() {
- stopRequested = true;
- this.interrupt();
+ } catch (InterruptedException e) {
+ logger.debug(EXCEPTION_STRING, e);
+ Thread.currentThread().interrupt();
}
+ }
- private void runOnce() {
- try {
- logger.debug("FPManager calling fpMonitorCycle()");
- // check forward progress timer
- fpMonitorCycle();
+ private void runOnce() {
+ try {
+ logger.debug("FPManager calling fpMonitorCycle()");
+ // check forward progress timer
+ fpMonitorCycle();
- logger.debug("FPManager calling checkTestTransaction()");
- // check test transaction timer
- checkTestTransaction();
+ logger.debug("FPManager calling checkTestTransaction()");
+ // check test transaction timer
+ checkTestTransaction();
- logger.debug("FPManager calling checkWriteFpc()");
- // check write Fpc timer
- checkWriteFpc();
+ logger.debug("FPManager calling checkWriteFpc()");
+ // check write Fpc timer
+ checkWriteFpc();
- logger.debug("FPManager calling checkDependentHealth()");
- // check dependency health
- checkDependentHealth();
+ logger.debug("FPManager calling checkDependentHealth()");
+ // check dependency health
+ checkDependentHealth();
- logger.debug("FPManager calling refreshStateAudit()");
- // check if it is time to run the refreshStateAudit
- refreshStateAudit();
+ logger.debug("FPManager calling refreshStateAudit()");
+ // check if it is time to run the refreshStateAudit
+ refreshStateAudit();
- logger.debug("FPManager calling stateAudit()");
- // check if it is time to run the stateAudit
- stateAudit();
+ logger.debug("FPManager calling stateAudit()");
+ // check if it is time to run the stateAudit
+ stateAudit();
- } catch (Exception e) {
- logger.error("Ignore FPManager thread processing timer(s) exception: ", e);
- }
+ } catch (Exception e) {
+ logger.error("Ignore FPManager thread processing timer(s) exception: ", e);
}
}
@@ -1775,7 +1826,7 @@ public class IntegrityMonitor {
throws AllSeemsWellException {
logger.debug("allSeemsWell entry: key = {}, asw = {}, msg = {}", key, asw, msg);
- if (key == null || key.isEmpty()) {
+ if (StringUtils.isEmpty(key)) {
logger.error("allSeemsWell: 'key' has no visible content");
throw new IllegalArgumentException("allSeemsWell: 'key' has no visible content");
}
@@ -1783,7 +1834,7 @@ public class IntegrityMonitor {
logger.error("allSeemsWell: 'asw' is null");
throw new IllegalArgumentException("allSeemsWell: 'asw' is null");
}
- if (msg == null || msg.isEmpty()) {
+ if (StringUtils.isEmpty(msg)) {
logger.error("allSeemsWell: 'msg' has no visible content");
throw new IllegalArgumentException("allSeemsWell: 'msg' has no visible content");
}
@@ -1798,40 +1849,13 @@ public class IntegrityMonitor {
if (asw) {
logger.info("allSeemsWell: ALL SEEMS WELL: key = {}, msg = {}", key, msg);
- try {
- allSeemsWellMap.put(key, msg);
- } catch (Exception e) {
- String exceptMsg =
- "allSeemsWell: encountered an exception with allSeemsWellMap.put(" + key + "," + msg + ")";
- logger.error(exceptMsg);
- throw new AllSeemsWellException(exceptMsg, e);
- }
-
- try {
- allNotWellMap.remove(key);
- } catch (Exception e) {
- String exceptMsg = "allSeemsWell: encountered an exception with allNotWellMap.delete(" + key + ")";
- logger.error(exceptMsg);
- throw new AllSeemsWellException(exceptMsg, e);
- }
+ allSeemsWellMap.put(key, msg);
+ allNotWellMap.remove(key);
} else {
logger.error("allSeemsWell: ALL NOT WELL: key = {}, msg = {}", key, msg);
- try {
- allSeemsWellMap.remove(key);
- } catch (Exception e) {
- String exceptMsg = "allSeemsWell: encountered an exception with allSeemsWellMap.remove(" + key + ")";
- logger.error(exceptMsg);
- throw new AllSeemsWellException(exceptMsg, e);
- }
-
- try {
- allNotWellMap.put(key, msg);
- } catch (Exception e) {
- String exceptMsg = "allSeemsWell: encountered an exception with allNotWellMap.put(" + key + msg + ")";
- logger.error(exceptMsg);
- throw new AllSeemsWellException(exceptMsg, e);
- }
+ allSeemsWellMap.remove(key);
+ allNotWellMap.put(key, msg);
}
if (logger.isDebugEnabled()) {
@@ -1862,13 +1886,13 @@ public class IntegrityMonitor {
public Map<String, String> getAllNotWellMap() {
return allNotWellMap;
}
-
+
// these methods may be overridden by junit tests
/**
* Indicates that the {@link FpManager#run()} method has started. This method
* simply returns.
- *
+ *
* @throws InterruptedException can be interrupted
*/
protected void runStarted() throws InterruptedException {
@@ -1877,7 +1901,7 @@ public class IntegrityMonitor {
/**
* Indicates that a monitor activity has completed. This method simply returns.
- *
+ *
* @throws InterruptedException can be interrupted
*/
protected void monitorCompleted() throws InterruptedException {
@@ -1886,7 +1910,7 @@ public class IntegrityMonitor {
/**
* Get persistence unit.
- *
+ *
* @return the persistence unit to be used
*/
protected String getPersistenceUnit() {
diff --git a/integrity-monitor/src/main/java/org/onap/policy/common/im/StateManagement.java b/integrity-monitor/src/main/java/org/onap/policy/common/im/StateManagement.java
index 35b33be8..c5f9d7bc 100644
--- a/integrity-monitor/src/main/java/org/onap/policy/common/im/StateManagement.java
+++ b/integrity-monitor/src/main/java/org/onap/policy/common/im/StateManagement.java
@@ -2,14 +2,14 @@
* ============LICENSE_START=======================================================
* Integrity Monitor
* ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -83,19 +83,19 @@ public class StateManagement extends Observable {
/*
* Guarantees single-threadedness of all actions. Only one action can execute at a time. That
* avoids race conditions between actions being called from different places.
- *
+ *
* Some actions can take significant time to complete and, if another conflicting action is
* called during its execution, it could put the system in an inconsistent state. This very
* thing happened when demote was called and the active/standby algorithm, seeing the state
* attempted to promote the PDP-D.
- *
+ *
*/
private static final Object SYNCLOCK = new Object();
private static final Object FLUSHLOCK = new Object();
/**
* StateManagement constructor.
- *
+ *
* @param entityManagerFactory the entity manager factory
* @param resourceName the resource name
* @throws StateManagementException if an error occurs
@@ -189,7 +189,7 @@ public class StateManagement extends Observable {
/**
* lock() changes the administrative state to locked.
- *
+ *
* @throws StateManagementException if an error occurs
*/
public void lock() throws StateManagementException {
@@ -232,7 +232,7 @@ public class StateManagement extends Observable {
/**
* unlock() changes the administrative state to unlocked.
- *
+ *
* @throws StateManagementException if an error occurs
*/
public void unlock() throws StateManagementException {
@@ -276,7 +276,7 @@ public class StateManagement extends Observable {
/**
* enableNotFailed() removes the "failed" availability status and changes the operational state
* to enabled if no dependency is also failed.
- *
+ *
* @throws StateManagementException if an error occurs
*/
public void enableNotFailed() throws StateManagementException {
@@ -323,7 +323,7 @@ public class StateManagement extends Observable {
/**
* disableFailed() changes the operational state to disabled and adds availability status of
* "failed".
- *
+ *
* @throws StateManagementException if an error occurs
*/
public void disableFailed() throws StateManagementException {
@@ -369,7 +369,7 @@ public class StateManagement extends Observable {
/**
* This version of disableFailed is to be used to manipulate the state of a remote resource in
* the event that remote resource has failed but its state is still showing that it is viable.
- *
+ *
* @throws StateManagementException if an error occurs
*/
public void disableFailed(final String otherResourceName) throws StateManagementException {
@@ -421,7 +421,7 @@ public class StateManagement extends Observable {
/**
* disableDependency() changes operational state to disabled and adds availability status of
* "dependency".
- *
+ *
* @throws StateManagementException if an error occurs
*/
public void disableDependency() throws StateManagementException {
@@ -467,7 +467,7 @@ public class StateManagement extends Observable {
/**
* enableNoDependency() removes the availability status of "dependency " and will change the
* operational state to enabled if not otherwise failed.
- *
+ *
* @throws StateManagementException if an error occurs
*/
public void enableNoDependency() throws StateManagementException {
@@ -512,11 +512,10 @@ public class StateManagement extends Observable {
/**
* promote() changes the standby status to providingservice if not otherwise failed.
- *
- * @throws StandbyStatusException if the status fails to change
- * @throws StateManagementException if an error occurs when promoting the status
+ *
+ * @throws IntegrityMonitorException if the status fails to change
*/
- public void promote() throws StandbyStatusException, StateManagementException {
+ public void promote() throws IntegrityMonitorException {
synchronized (SYNCLOCK) {
if (logger.isDebugEnabled()) {
logger.debug("\nStateManagement: SYNCLOCK promote() operation for resourceName = {}\n",
@@ -564,15 +563,15 @@ public class StateManagement extends Observable {
/**
* demote() changes standbystatus to hotstandby or, if failed, coldstandby.
- *
+ *
* @throws StateManagementException if an error occurs
*/
public void demote() throws StateManagementException {
synchronized (SYNCLOCK) {
if (logger.isDebugEnabled()) {
- logger.debug("\nStateManagement: SYNCLOCK demote() operation for resourceName = {}\n",
+ logger.debug("\nStateManagement: SYNCLOCK demote() operation for resourceName = {}\n",
this.resourceName);
- logger.debug("StateManagement: demote() operation started, resourceName = {}",
+ logger.debug("StateManagement: demote() operation started, resourceName = {}",
this.resourceName);
}
final EntityManager em = emf.createEntityManager();
@@ -611,7 +610,7 @@ public class StateManagement extends Observable {
* the remote resource has failed is such a way that it cannot update its own states. In
* particular this is observed by PDP-D DroolsPdpsElectionHandler when it is trying to determine
* which PDP-D should be designated as the lead.
- *
+ *
* @param otherResourceName the resouce name
* @throws StateManagementException if an error occurs
*/
@@ -660,7 +659,7 @@ public class StateManagement extends Observable {
/**
* Get the administration state.
- *
+ *
* @return the administration state
*/
public String getAdminState() {
@@ -696,7 +695,7 @@ public class StateManagement extends Observable {
/**
* Get the operational state.
- *
+ *
* @return the operational state
*/
public String getOpState() {
@@ -732,7 +731,7 @@ public class StateManagement extends Observable {
/**
* Get the availability status.
- *
+ *
* @return the availability status
*/
public String getAvailStatus() {
@@ -768,7 +767,7 @@ public class StateManagement extends Observable {
/**
* Get the standy status.
- *
+ *
* @return the standby status
*/
public String getStandbyStatus() {
@@ -804,7 +803,7 @@ public class StateManagement extends Observable {
/**
* Get the standbystatus of a particular resource.
- *
+ *
* @param otherResourceName the resource
* @return the standby status
*/
@@ -855,7 +854,7 @@ public class StateManagement extends Observable {
/**
* Find a StateManagementEntity.
- *
+ *
* @param em the entity manager
* @param otherResourceName the resource name
* @return the StateManagementEntity
@@ -944,7 +943,7 @@ public class StateManagement extends Observable {
/**
* Create an instance.
- *
+ *
* @param em the entity manager
*/
public MyTransaction(final EntityManager em) {
diff --git a/integrity-monitor/src/main/java/org/onap/policy/common/im/StateTransition.java b/integrity-monitor/src/main/java/org/onap/policy/common/im/StateTransition.java
index 79eeee49..748d79e6 100644
--- a/integrity-monitor/src/main/java/org/onap/policy/common/im/StateTransition.java
+++ b/integrity-monitor/src/main/java/org/onap/policy/common/im/StateTransition.java
@@ -97,6 +97,7 @@ public class StateTransition {
logger.debug("getEndingState");
logger.debug("adminState=[{}], opState=[{}], availStatus=[{}], standbyStatus=[{}], actionName[{}]",
adminState, opState, availStatus, standbyStatus, actionName);
+
if (availStatus == null) {
availStatus = StateManagement.NULL_VALUE;
}
@@ -119,49 +120,37 @@ public class StateTransition {
StateElement stateElement = new StateElement();
- try {
- // dependency,failed is stored as dependency.failed in StateTable
- String availStatus2 = availStatus;
- if (availStatus2 != null) {
- availStatus2 = availStatus.replace(",", ".");
- }
- String key = adminState + "," + opState + "," + availStatus2 + "," + standbyStatus + "," + actionName;
- if (logger.isDebugEnabled()) {
- logger.debug("Ending State search key: {}", key);
- }
- String value = STATE_TABLE.get(key);
- if (value != null) {
- try {
- String[] parts = value.split(",", 5);
- stateElement.setEndingAdminState(parts[0].trim());
- stateElement.setEndingOpState(parts[1].trim());
- stateElement.setEndingAvailStatus(parts[2].trim().replace(".", ","));
- stateElement.setEndingStandbyStatus(parts[3].trim());
- stateElement.setException(parts[4].trim());
- stateElement.setAdminState(adminState);
- stateElement.setOpState(opState);
- stateElement.setAvailStatus(availStatus);
- stateElement.setStandbyStatus(standbyStatus);
- stateElement.setActionName(actionName);
+ // dependency,failed is stored as dependency.failed in StateTable
+ String availStatus2 = availStatus;
+ if (availStatus2 != null) {
+ availStatus2 = availStatus.replace(",", ".");
+ }
+ String key = adminState + "," + opState + "," + availStatus2 + "," + standbyStatus + "," + actionName;
+ logger.debug("Ending State search key: {}", key);
+ String value = STATE_TABLE.get(key);
+
+ if (value != null) {
+ String[] parts = value.split(",", 5);
+ stateElement.setEndingAdminState(parts[0].trim());
+ stateElement.setEndingOpState(parts[1].trim());
+ stateElement.setEndingAvailStatus(parts[2].trim().replace(".", ","));
+ stateElement.setEndingStandbyStatus(parts[3].trim());
+ stateElement.setException(parts[4].trim());
+ stateElement.setAdminState(adminState);
+ stateElement.setOpState(opState);
+ stateElement.setAvailStatus(availStatus);
+ stateElement.setStandbyStatus(standbyStatus);
+ stateElement.setActionName(actionName);
- stateElement.displayStateElement();
- } catch (Exception ex) {
- logger.error("String split exception: {}", ex.toString(), ex);
- }
+ stateElement.displayStateElement();
- } else {
- String msg = "Ending state not found, adminState=[" + adminState + OPSTATE_STRING + opState
- + AVAILSTATUS_STRING + availStatus + STANDBY_STRING + standbyStatus + ACTION_STRING
- + actionName + "]";
- logger.error("{}", msg);
- throw new StateTransitionException(msg);
- }
- } catch (Exception ex) {
- logger.error("StateTransition threw exception.", ex);
- throw new StateTransitionException("Exception: " + ex.toString() + ", adminState=[" + adminState
- + OPSTATE_STRING + opState + AVAILSTATUS_STRING + availStatus + STANDBY_STRING + standbyStatus
- + ACTION_STRING + actionName + "]");
+ } else {
+ String msg = "Ending state not found, adminState=[" + adminState + OPSTATE_STRING + opState
+ + AVAILSTATUS_STRING + availStatus + STANDBY_STRING + standbyStatus + ACTION_STRING
+ + actionName + "]";
+ logger.error("{}", msg);
+ throw new StateTransitionException(msg);
}
return stateElement;
diff --git a/integrity-monitor/src/test/java/org/onap/policy/common/im/AllSeemsWellTest.java b/integrity-monitor/src/test/java/org/onap/policy/common/im/AllSeemsWellTest.java
index 6d67dd1b..0c4bfde1 100644
--- a/integrity-monitor/src/test/java/org/onap/policy/common/im/AllSeemsWellTest.java
+++ b/integrity-monitor/src/test/java/org/onap/policy/common/im/AllSeemsWellTest.java
@@ -2,14 +2,14 @@
* ============LICENSE_START=======================================================
* Integrity Monitor
* ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,10 +20,12 @@
package org.onap.policy.common.im;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import java.util.Map;
+import java.util.Map.Entry;
import java.util.Properties;
import java.util.concurrent.Semaphore;
import org.junit.After;
@@ -36,6 +38,8 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class AllSeemsWellTest extends IntegrityMonitorTestBase {
+ private static final String ALL_SEEMS_WELL_MSG = "'AllSeemsWellTest - ALLSEEMSWELL'";
+
private static Logger logger = LoggerFactory.getLogger(AllSeemsWellTest.class);
private static Properties myProp;
@@ -51,11 +55,11 @@ public class AllSeemsWellTest extends IntegrityMonitorTestBase {
public static void setUpClass() throws Exception {
IntegrityMonitorTestBase.setUpBeforeClass(DEFAULT_DB_URL_PREFIX + AllSeemsWellTest.class.getSimpleName());
- resourceName = IntegrityMonitorTestBase.siteName + "." + IntegrityMonitorTestBase.nodeType;
+ resourceName = IntegrityMonitorTestBase.SITE_NAME + "." + IntegrityMonitorTestBase.NODE_TYPE;
}
@AfterClass
- public static void tearDownClass() throws Exception {
+ public static void tearDownClass() {
IntegrityMonitorTestBase.tearDownAfterClass();
}
@@ -73,11 +77,11 @@ public class AllSeemsWellTest extends IntegrityMonitorTestBase {
junitSem = new Semaphore(0);
IntegrityMonitor im = new IntegrityMonitor(resourceName, myProp) {
-
+
@Override
protected void runStarted() throws InterruptedException {
monitorSem.acquire();
-
+
junitSem.release();
monitorSem.acquire();
}
@@ -86,7 +90,7 @@ public class AllSeemsWellTest extends IntegrityMonitorTestBase {
protected void monitorCompleted() throws InterruptedException {
junitSem.release();
monitorSem.acquire();
- }
+ }
};
Whitebox.setInternalState(IntegrityMonitor.class, IM_INSTANCE_FIELD, im);
@@ -137,20 +141,19 @@ public class AllSeemsWellTest extends IntegrityMonitorTestBase {
+ "{}\nStandbyStatus = {}\n",
sm.getAdminState(), sm.getOpState(), sm.getAvailStatus(), sm.getStandbyStatus());
- // assertEquals(StateManagement.DISABLED, sm.getOpState());
-
Map<String, String> allNotWellMap = im.getAllNotWellMap();
- for (String key : allNotWellMap.keySet()) {
- logger.debug("AllSeemsWellTest: allNotWellMap: key = {} msg = {}", key, allNotWellMap.get(key));
+ if (logger.isDebugEnabled()) {
+ for (Entry<String, String> ent : allNotWellMap.entrySet()) {
+ logger.debug("AllSeemsWellTest: allNotWellMap: key = {} msg = {}", ent.getKey(), ent.getValue());
+ }
}
- // assertEquals(1, allNotWellMap.size());
+ assertEquals(1, allNotWellMap.size());
- im.getAllSeemsWellMap();
- // assertTrue(allSeemsWellMap.isEmpty());
+ assertTrue(im.getAllSeemsWellMap().isEmpty());
// Return to normal
im.allSeemsWell(this.getClass().getName(), IntegrityMonitorProperties.ALLSEEMSWELL,
- "'AllSeemsWellTest - ALLSEEMSWELL'");
+ ALL_SEEMS_WELL_MSG);
// Wait for the state to change due to ALLNOTWELL
waitStateChange();
@@ -160,44 +163,38 @@ public class AllSeemsWellTest extends IntegrityMonitorTestBase {
+ "{}\nStandbyStatus = {}\n",
sm.getAdminState(), sm.getOpState(), sm.getAvailStatus(), sm.getStandbyStatus());
- // assertEquals(StateManagement.ENABLED, sm.getOpState());
+ assertEquals(StateManagement.ENABLED, sm.getOpState());
allNotWellMap = im.getAllNotWellMap();
assertTrue(allNotWellMap.isEmpty());
Map<String, String> allSeemsWellMap = im.getAllSeemsWellMap();
assertEquals(1, allSeemsWellMap.size());
- for (String key : allSeemsWellMap.keySet()) {
- logger.debug("AllSeemsWellTest: allSeemsWellMap: key = {} msg = {}", key, allSeemsWellMap.get(key));
+ if (logger.isDebugEnabled()) {
+ for (Entry<String, String> ent : allSeemsWellMap.entrySet()) {
+ logger.debug("AllSeemsWellTest: allSeemsWellMap: key = {} msg = {}", ent.getKey(), ent.getValue());
+ }
}
// Check for null parameters
- assertException(im, imx -> {
- imx.allSeemsWell(null, IntegrityMonitorProperties.ALLSEEMSWELL, "'AllSeemsWellTest - ALLSEEMSWELL'");
- });
+ assertThatThrownBy(() -> im.allSeemsWell(null, IntegrityMonitorProperties.ALLSEEMSWELL, ALL_SEEMS_WELL_MSG));
- assertException(im, imx -> {
- im.allSeemsWell("", IntegrityMonitorProperties.ALLSEEMSWELL, "'AllSeemsWellTest - ALLSEEMSWELL'");
- });
+ assertThatThrownBy(() -> im.allSeemsWell("", IntegrityMonitorProperties.ALLSEEMSWELL, ALL_SEEMS_WELL_MSG));
- assertException(im, imx -> {
- im.allSeemsWell(this.getClass().getName(), null, "'AllSeemsWellTest - ALLSEEMSWELL'");
- });
+ assertThatThrownBy(() -> im.allSeemsWell(this.getClass().getName(), null, ALL_SEEMS_WELL_MSG));
- assertException(im, imx -> {
- im.allSeemsWell(this.getClass().getName(), IntegrityMonitorProperties.ALLSEEMSWELL, null);
- });
+ assertThatThrownBy(() -> im.allSeemsWell(this.getClass().getName(), IntegrityMonitorProperties.ALLSEEMSWELL,
+ null));
- assertException(im, imx -> {
- im.allSeemsWell(this.getClass().getName(), IntegrityMonitorProperties.ALLSEEMSWELL, "");
- });
+ assertThatThrownBy(
+ () -> im.allSeemsWell(this.getClass().getName(), IntegrityMonitorProperties.ALLSEEMSWELL, ""));
logger.debug("\n\ntestAllSeemsWell: Exit\n\n");
}
/**
* Waits for the state to change.
- *
+ *
* @throws InterruptedException if the thread is interrupted
*/
private void waitStateChange() throws InterruptedException {
diff --git a/integrity-monitor/src/test/java/org/onap/policy/common/im/ExceptionsTest.java b/integrity-monitor/src/test/java/org/onap/policy/common/im/ExceptionsTest.java
index f3cb1eff..715d8f75 100644
--- a/integrity-monitor/src/test/java/org/onap/policy/common/im/ExceptionsTest.java
+++ b/integrity-monitor/src/test/java/org/onap/policy/common/im/ExceptionsTest.java
@@ -2,14 +2,14 @@
* ============LICENSE_START=======================================================
* Integrity Monitor
* ================================================================================
- * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -32,47 +32,47 @@ import org.onap.policy.common.utils.test.ExceptionsTester;
public class ExceptionsTest extends ExceptionsTester {
@Test
- public void testStateTransitionException() throws Exception {
+ public void testStateTransitionException() {
assertEquals(4, test(StateTransitionException.class));
}
@Test
- public void testStateManagementException() throws Exception {
+ public void testStateManagementException() {
assertEquals(4, test(StateManagementException.class));
}
@Test
- public void testStandbyStatusException() throws Exception {
+ public void testStandbyStatusException() {
assertEquals(5, test(StandbyStatusException.class));
}
@Test
- public void testIntegrityMonitorPropertiesException() throws Exception {
+ public void testIntegrityMonitorPropertiesException() {
assertEquals(4, test(IntegrityMonitorPropertiesException.class));
}
@Test
- public void testIntegrityMonitorException() throws Exception {
+ public void testIntegrityMonitorException() {
assertEquals(5, test(IntegrityMonitorException.class));
}
@Test
- public void testForwardProgressException() throws Exception {
+ public void testForwardProgressException() {
assertEquals(4, test(ForwardProgressException.class));
}
@Test
- public void testAllSeemsWellException() throws Exception {
+ public void testAllSeemsWellException() {
assertEquals(4, test(AllSeemsWellException.class));
}
@Test
- public void testAdministrativeStateException() throws Exception {
+ public void testAdministrativeStateException() {
assertEquals(4, test(AdministrativeStateException.class));
}
@Test
- public void testComponentAdminException() throws Exception {
+ public void testComponentAdminException() {
assertEquals(4, test(ComponentAdminException.class));
}
}
diff --git a/integrity-monitor/src/test/java/org/onap/policy/common/im/IntegrityMonitorTest.java b/integrity-monitor/src/test/java/org/onap/policy/common/im/IntegrityMonitorTest.java
index 862552b8..3c36c5d6 100644
--- a/integrity-monitor/src/test/java/org/onap/policy/common/im/IntegrityMonitorTest.java
+++ b/integrity-monitor/src/test/java/org/onap/policy/common/im/IntegrityMonitorTest.java
@@ -2,14 +2,14 @@
* ============LICENSE_START=======================================================
* Integrity Monitor
* ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,6 +20,7 @@
package org.onap.policy.common.im;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
@@ -49,8 +50,21 @@ import org.slf4j.LoggerFactory;
* tasks.
*/
public class IntegrityMonitorTest extends IntegrityMonitorTestBase {
+ private static final String STANDBY_STATUS = "StandbyStatus = {}\n";
+ private static final String RESTARTING_MSG = "\ntestSanityJmx restarting the IntegrityMonitor";
+ private static final String FALSE_STRING = "false";
+ private static final String GROUP1_DEP1 = "group1_dep1";
+ private static final String RESOURCE = "resource";
+ private static final String SITE_A_PAP2 = "siteA_pap2";
+ private static final String SITE_B_PAP1 = "siteB_pap1";
+ private static final String SITE_B_PAP2 = "siteB_pap2";
+
+ private static final String ENABLE_NO_DEPENDENCY_MSG =
+ "\n\nsm.enableNoDependency()\nAdminState = {}\nOpState() = {}\n"
+ + "AvailStatus = {}\nStandbyStatus = {}\n";
+
private static Logger logger = LoggerFactory.getLogger(IntegrityMonitorTest.class);
-
+
/**
* Number of monitor cycles it takes between dependency health checks.
*/
@@ -70,14 +84,14 @@ public class IntegrityMonitorTest extends IntegrityMonitorTestBase {
public static void setUpClass() throws Exception {
IntegrityMonitorTestBase.setUpBeforeClass(DEFAULT_DB_URL_PREFIX + IntegrityMonitorTest.class.getSimpleName());
- resourceName = IntegrityMonitorTestBase.siteName + "." + IntegrityMonitorTestBase.nodeType;
+ resourceName = IntegrityMonitorTestBase.SITE_NAME + "." + IntegrityMonitorTestBase.NODE_TYPE;
}
/**
* Tear down after test class.
*/
@AfterClass
- public static void tearDownClass() throws Exception {
+ public static void tearDownClass() {
IntegrityMonitorTestBase.tearDownAfterClass();
}
@@ -85,7 +99,7 @@ public class IntegrityMonitorTest extends IntegrityMonitorTestBase {
* Set up for test cases.
*/
@Before
- public void setUp() throws Exception {
+ public void setUp() {
super.setUpTest();
myProp = makeProperties();
@@ -96,7 +110,7 @@ public class IntegrityMonitorTest extends IntegrityMonitorTestBase {
* Tear down after test cases.
*/
@After
- public void tearDown() throws Exception {
+ public void tearDown() {
if (et != null && et.isActive()) {
try {
et.rollback();
@@ -140,7 +154,7 @@ public class IntegrityMonitorTest extends IntegrityMonitorTestBase {
IntegrityMonitor im = makeMonitor(resourceName, myProp);
logger.debug(
"\n\ntestSanityJmx starting im state \nAdminState = {}\nOpState() = {}\nAvailStatus = {}\n"
- + "StandbyStatus = {}\n",
+ + STANDBY_STATUS,
im.getStateManager().getAdminState(), im.getStateManager().getOpState(),
im.getStateManager().getAvailStatus(), im.getStateManager().getStandbyStatus());
// add an entry to Resource registration table in the DB for the
@@ -177,13 +191,12 @@ public class IntegrityMonitorTest extends IntegrityMonitorTestBase {
*/
waitCycles(DEPENDENCY_CHECK_CYCLES);
- assertException(im, imx -> {
- imx.evaluateSanity();
- });
+ final IntegrityMonitor im2 = im;
+ assertThatThrownBy(im2::evaluateSanity);
// undo dependency groups and jmx test properties settings
myProp.put(IntegrityMonitorProperties.DEPENDENCY_GROUPS, "");
- myProp.put(IntegrityMonitorProperties.TEST_VIA_JMX, "false");
+ myProp.put(IntegrityMonitorProperties.TEST_VIA_JMX, FALSE_STRING);
IntegrityMonitor.updateProperties(myProp);
logger.debug("\ntestSantityJmx ending properties: {}", myProp);
@@ -195,11 +208,11 @@ public class IntegrityMonitorTest extends IntegrityMonitorTestBase {
logger.debug(
"\n\ntestSanityJmx ending im state\nAdminState = {}\nOpState() = {}\nAvailStatus = {}\n"
- + "StandbyStatus = {}\n",
+ + STANDBY_STATUS,
im.getStateManager().getAdminState(), im.getStateManager().getOpState(),
im.getStateManager().getAvailStatus(), im.getStateManager().getStandbyStatus());
- logger.debug("\ntestSanityJmx restarting the IntegrityMonitor");
+ logger.debug(RESTARTING_MSG);
// Create a new instance. It should recover from the disabled-dependency
// condition
im = makeMonitor(resourceName, myProp);
@@ -226,7 +239,7 @@ public class IntegrityMonitorTest extends IntegrityMonitorTestBase {
assertEquals(StateManagement.LOCKED, sm.getAdminState());
// Verify lock persists across a restart
- logger.debug("\ntestSanityJmx restarting the IntegrityMonitor");
+ logger.debug(RESTARTING_MSG);
// Create a new instance. It should come up with the admin state locked
im = makeMonitor(resourceName, myProp);
sm = im.getStateManager();
@@ -244,7 +257,7 @@ public class IntegrityMonitorTest extends IntegrityMonitorTestBase {
assertEquals(StateManagement.UNLOCKED, sm.getAdminState());
// Verify unlock restart
- logger.debug("\ntestSanityJmx restarting the IntegrityMonitor");
+ logger.debug(RESTARTING_MSG);
// Create a new instance. It should come up with the admin state locked
im = makeMonitor(resourceName, myProp);
sm = im.getStateManager();
@@ -284,14 +297,10 @@ public class IntegrityMonitorTest extends IntegrityMonitorTestBase {
waitCycles(1);
// test evaluate sanity
- assertNoException(im, imx -> {
- imx.evaluateSanity();
- });
+ im.evaluateSanity();
// Test startTransaction - should work since it is unlocked
- assertNoException(im, imx -> {
- imx.startTransaction();
- });
+ im.startTransaction();
// Test state manager via the IntegrityMonitor
StateManagement sm = im.getStateManager();
@@ -304,9 +313,7 @@ public class IntegrityMonitorTest extends IntegrityMonitorTestBase {
assertEquals(StateManagement.LOCKED, sm.getAdminState());
// test startTransaction. It should fail since it is locked
- assertException(im, imx -> {
- imx.startTransaction();
- });
+ assertThatThrownBy(im::startTransaction);
sm.unlock();
logger.debug("\n\nsm.unlock()\nAdminState = {}\nOpState() = {}\nAvailStatus = {}\nStandbyStatus = {}\n",
@@ -314,9 +321,7 @@ public class IntegrityMonitorTest extends IntegrityMonitorTestBase {
assertEquals(StateManagement.UNLOCKED, sm.getAdminState());
// test startTransaction. It should succeed
- assertNoException(im, imx -> {
- imx.startTransaction();
- });
+ im.startTransaction();
sm.disableDependency();
logger.debug(
@@ -328,21 +333,17 @@ public class IntegrityMonitorTest extends IntegrityMonitorTestBase {
// test startTransaction. It should succeed since standby status is null
// and unlocked
- assertNoException(im, imx -> {
- imx.startTransaction();
- });
+ im.startTransaction();
sm.enableNoDependency();
logger.debug(
- "\n\nsm.enableNoDependency()\nAdminState = {}\nOpState() = {}\nAvailStatus = {}\nStandbyStatus = {}\n",
+ ENABLE_NO_DEPENDENCY_MSG,
sm.getAdminState(), sm.getOpState(), sm.getAvailStatus(), sm.getStandbyStatus());
assertEquals(StateManagement.ENABLED, sm.getOpState());
// test startTransaction. It should succeed since standby status is null
// and unlocked
- assertNoException(im, imx -> {
- imx.startTransaction();
- });
+ im.startTransaction();
sm.disableFailed();
logger.debug("\n\nsm.disableFailed()\nAdminState = {}\nOpState() = {}\nAvailStatus = {}\nStandbyStatus = {}\n",
@@ -352,9 +353,7 @@ public class IntegrityMonitorTest extends IntegrityMonitorTestBase {
assertEquals(StateManagement.FAILED, sm.getAvailStatus());
// test startTransaction. It should succeed since standby status is null
// and unlocked
- assertNoException(im, imx -> {
- imx.startTransaction();
- });
+ im.startTransaction();
sm.enableNotFailed();
@@ -365,9 +364,7 @@ public class IntegrityMonitorTest extends IntegrityMonitorTestBase {
assertEquals(StateManagement.ENABLED, sm.getOpState());
// test startTransaction. It should succeed since standby status is null
// and unlocked
- assertNoException(im, imx -> {
- imx.startTransaction();
- });
+ im.startTransaction();
sm.demote();
@@ -377,9 +374,7 @@ public class IntegrityMonitorTest extends IntegrityMonitorTestBase {
assertEquals(StateManagement.HOT_STANDBY, sm.getStandbyStatus());
// test startTransaction. It should fail since it is standby
- assertException(im, imx -> {
- imx.startTransaction();
- });
+ assertThatThrownBy(im::startTransaction);
sm.promote();
@@ -390,9 +385,7 @@ public class IntegrityMonitorTest extends IntegrityMonitorTestBase {
// test startTransaction. It should succeed since it is providing
// service
- assertNoException(im, imx -> {
- imx.startTransaction();
- });
+ im.startTransaction();
// Test the multi-valued availability status
sm.disableDependency();
@@ -400,54 +393,46 @@ public class IntegrityMonitorTest extends IntegrityMonitorTestBase {
logger.debug(
"\n\nsm.disableDependency(), sm.disableFailed\nAdminState = {}\nOpState() = {}\nAvailStatus = {}\n"
- + "StandbyStatus = {}\n",
+ + STANDBY_STATUS,
sm.getAdminState(), sm.getOpState(), sm.getAvailStatus(), sm.getStandbyStatus());
assertEquals(StateManagement.DEPENDENCY_FAILED, sm.getAvailStatus());
// Test startTransaction. Should fail since standby status is cold
// standby
- assertException(im, imx -> {
- imx.startTransaction();
- });
+ assertThatThrownBy(im::startTransaction);
sm.enableNoDependency();
logger.debug(
- "\n\nsm.enableNoDependency()\nAdminState = {}\nOpState() = {}\nAvailStatus = {}\nStandbyStatus = {}\n",
+ ENABLE_NO_DEPENDENCY_MSG,
sm.getAdminState(), sm.getOpState(), sm.getAvailStatus(), sm.getStandbyStatus());
assertEquals(StateManagement.FAILED, sm.getAvailStatus());
// Test startTransaction. Should fail since standby status is cold
// standby
- assertException(im, imx -> {
- imx.startTransaction();
- });
+ assertThatThrownBy(im::startTransaction);
sm.disableDependency();
sm.enableNotFailed();
logger.debug(
"\n\nsm.disableDependency(),sm.enableNotFailed()\nAdminState = {}\nOpState() = {}\nAvailStatus = {}\n"
- + "StandbyStatus = {}\n",
+ + STANDBY_STATUS,
sm.getAdminState(), sm.getOpState(), sm.getAvailStatus(), sm.getStandbyStatus());
assertEquals(StateManagement.DEPENDENCY, sm.getAvailStatus());
// Test startTransaction. Should fail since standby status is cold
// standby
- assertException(im, imx -> {
- imx.startTransaction();
- });
+ assertThatThrownBy(im::startTransaction);
sm.enableNoDependency();
logger.debug(
- "\n\nsm.enableNoDependency()\nAdminState = {}\nOpState() = {}\nAvailStatus = {}\nStandbyStatus = {}\n",
+ ENABLE_NO_DEPENDENCY_MSG,
sm.getAdminState(), sm.getOpState(), sm.getAvailStatus(), sm.getStandbyStatus());
assertEquals(StateManagement.ENABLED, sm.getOpState());
// test startTransaction. It should fail since standby status is hot
// standby
- assertException(im, imx -> {
- imx.startTransaction();
- });
+ assertThatThrownBy(im::startTransaction);
logger.debug("\n\ntestIM: Exit\n\n");
}
@@ -482,7 +467,7 @@ public class IntegrityMonitorTest extends IntegrityMonitorTestBase {
ForwardProgressEntity fpe = new ForwardProgressEntity();
ForwardProgressEntity fpe2 = new ForwardProgressEntity();
fpe.setFpcCount(0);
- fpe.setResourceName("group1_dep1");
+ fpe.setResourceName(GROUP1_DEP1);
fpe2.setFpcCount(0);
fpe2.setResourceName("group1_dep2");
et = em.getTransaction();
@@ -498,16 +483,14 @@ public class IntegrityMonitorTest extends IntegrityMonitorTestBase {
StateManagement stateManager = new StateManagement(emf, "group2_dep1");
stateManager.lock();
- new StateManagement(emf, "group1_dep1");
+ new StateManagement(emf, GROUP1_DEP1);
new StateManagement(emf, "group1_dep2");
// Call the dependency check directly instead of waiting for FPManager
// to do it.
logger.debug("\n\nIntegrityMonitor.testSanityState: calling im.dependencyCheck()\n\n");
im.dependencyCheck();
- assertException(im, imx -> {
- imx.evaluateSanity();
- });
+ assertThatThrownBy(im::evaluateSanity);
logger.debug("\n\ntestSanityState: Exit\n\n");
}
@@ -518,7 +501,7 @@ public class IntegrityMonitorTest extends IntegrityMonitorTestBase {
// parameters are passed via a properties file
myProp.put(IntegrityMonitorProperties.DEPENDENCY_GROUPS, "");
- myProp.put(IntegrityMonitorProperties.TEST_VIA_JMX, "false");
+ myProp.put(IntegrityMonitorProperties.TEST_VIA_JMX, FALSE_STRING);
// Disable the integrity monitor so it will not interfere
myProp.put(IntegrityMonitorProperties.FP_MONITOR_INTERVAL, "-1");
// Disable the refresh state audit
@@ -541,33 +524,33 @@ public class IntegrityMonitorTest extends IntegrityMonitorTestBase {
Query query = em.createQuery("Select p from StateManagementEntity p where p.resourceName=:resource");
- query.setParameter("resource", resourceName);
+ query.setParameter(RESOURCE, resourceName);
// Just test that we are retrieving the right object
@SuppressWarnings("rawtypes")
List resourceList = query.getResultList();
- if (!resourceList.isEmpty()) {
- // exist
- sme = (StateManagementEntity) resourceList.get(0);
- em.refresh(sme);
-
- logger.debug(
- "??? -- Retrieve StateManagementEntity from database --\nsme.getResourceName() = {}\n"
- + "sme.getAdminState() = {}\nsme.getOpState() = {}\nsme.getAvailStatus() = {}\n"
- + "sme.getStandbyStatus() = {}",
- sme.getResourceName(), sme.getAdminState(), sme.getOpState(), sme.getAvailStatus(),
- sme.getStandbyStatus());
-
- assertEquals(StateManagement.UNLOCKED, sme.getAdminState());
- assertEquals(StateManagement.ENABLED, sme.getOpState());
- assertEquals(StateManagement.NULL_VALUE, sme.getAvailStatus());
- assertEquals(StateManagement.NULL_VALUE, sme.getStandbyStatus());
- logger.debug("--");
- } else {
+ if (resourceList.isEmpty()) {
logger.debug("Record not found, resourceName: " + resourceName);
fail("missing record");
}
+ // exist
+ sme = (StateManagementEntity) resourceList.get(0);
+ em.refresh(sme);
+
+ logger.debug(
+ "??? -- Retrieve StateManagementEntity from database --\nsme.getResourceName() = {}\n"
+ + "sme.getAdminState() = {}\nsme.getOpState() = {}\nsme.getAvailStatus() = {}\n"
+ + "sme.getStandbyStatus() = {}",
+ sme.getResourceName(), sme.getAdminState(), sme.getOpState(), sme.getAvailStatus(),
+ sme.getStandbyStatus());
+
+ assertEquals(StateManagement.UNLOCKED, sme.getAdminState());
+ assertEquals(StateManagement.ENABLED, sme.getOpState());
+ assertEquals(StateManagement.NULL_VALUE, sme.getAvailStatus());
+ assertEquals(StateManagement.NULL_VALUE, sme.getStandbyStatus());
+ logger.debug("--");
+
et = em.getTransaction();
et.begin();
@@ -585,7 +568,7 @@ public class IntegrityMonitorTest extends IntegrityMonitorTestBase {
Query query1 = em.createQuery("Select p from StateManagementEntity p where p.resourceName=:resource");
- query1.setParameter("resource", resourceName);
+ query1.setParameter(RESOURCE, resourceName);
@SuppressWarnings("rawtypes")
List resourceList1 = query1.getResultList();
@@ -618,8 +601,8 @@ public class IntegrityMonitorTest extends IntegrityMonitorTestBase {
logger.debug("\nIntegrityMonitorTest: Entering testStateCheck\n\n");
// parameters are passed via a properties file
- myProp.put(IntegrityMonitorProperties.DEPENDENCY_GROUPS, "group1_dep1");
- myProp.put(IntegrityMonitorProperties.TEST_VIA_JMX, "false");
+ myProp.put(IntegrityMonitorProperties.DEPENDENCY_GROUPS, GROUP1_DEP1);
+ myProp.put(IntegrityMonitorProperties.TEST_VIA_JMX, FALSE_STRING);
myProp.put(IntegrityMonitorProperties.FAILED_COUNTER_THRESHOLD, "1");
/*
* The monitorInterval is set to 10 and the failedCounterThreshold is 1 because stateCheck()
@@ -646,20 +629,18 @@ public class IntegrityMonitorTest extends IntegrityMonitorTestBase {
// This sets lastUpdated to the current time
ForwardProgressEntity fpe = new ForwardProgressEntity();
fpe.setFpcCount(0);
- fpe.setResourceName("group1_dep1");
+ fpe.setResourceName(GROUP1_DEP1);
et = em.getTransaction();
et.begin();
em.persist(fpe);
em.flush();
et.commit();
- new StateManagement(emf, "group1_dep1");
+ new StateManagement(emf, GROUP1_DEP1);
IntegrityMonitor im = makeMonitor(resourceName, myProp);
- assertNoException(im, imx -> {
- imx.evaluateSanity();
- });
+ im.evaluateSanity();
/*
* wait for FPManager to perform dependency health check. Once that's done, it
@@ -667,9 +648,7 @@ public class IntegrityMonitorTest extends IntegrityMonitorTestBase {
*/
waitCycles(DEPENDENCY_CHECK_CYCLES);
- assertException(im, imx -> {
- imx.evaluateSanity();
- });
+ assertThatThrownBy(im::evaluateSanity);
logger.debug("\n\ntestStateCheck: Exit\n\n");
}
@@ -679,7 +658,7 @@ public class IntegrityMonitorTest extends IntegrityMonitorTestBase {
logger.debug("\nIntegrityMonitorTest: Entering testGetAllForwardProgressEntity\n\n");
// parameters are passed via a properties file
myProp.put(IntegrityMonitorProperties.DEPENDENCY_GROUPS, "");
- myProp.put(IntegrityMonitorProperties.TEST_VIA_JMX, "false");
+ myProp.put(IntegrityMonitorProperties.TEST_VIA_JMX, FALSE_STRING);
// Disable the integrity monitor so it will not interfere
myProp.put(IntegrityMonitorProperties.FP_MONITOR_INTERVAL, "-1");
// Disable the refresh state audit
@@ -702,11 +681,11 @@ public class IntegrityMonitorTest extends IntegrityMonitorTestBase {
final ForwardProgressEntity fpe2 = new ForwardProgressEntity();
final ForwardProgressEntity fpe3 = new ForwardProgressEntity();
fpe.setFpcCount(0);
- fpe.setResourceName("siteA_pap2");
+ fpe.setResourceName(SITE_A_PAP2);
fpe2.setFpcCount(0);
- fpe2.setResourceName("siteB_pap1");
+ fpe2.setResourceName(SITE_B_PAP1);
fpe3.setFpcCount(0);
- fpe3.setResourceName("siteB_pap2");
+ fpe3.setResourceName(SITE_B_PAP2);
et = em.getTransaction();
et.begin();
em.persist(fpe);
@@ -733,7 +712,7 @@ public class IntegrityMonitorTest extends IntegrityMonitorTestBase {
// No Dependency Groups
myProp.put(IntegrityMonitorProperties.DEPENDENCY_GROUPS, "");
// Don't use JMX
- myProp.put(IntegrityMonitorProperties.TEST_VIA_JMX, "false");
+ myProp.put(IntegrityMonitorProperties.TEST_VIA_JMX, FALSE_STRING);
// Disable the internal sanity monitoring.
myProp.put(IntegrityMonitorProperties.FP_MONITOR_INTERVAL, "-1");
// Disable the dependency monitoring.
@@ -759,26 +738,26 @@ public class IntegrityMonitorTest extends IntegrityMonitorTestBase {
final ForwardProgressEntity fpe2 = new ForwardProgressEntity();
final ForwardProgressEntity fpe3 = new ForwardProgressEntity();
fpe1.setFpcCount(0);
- fpe1.setResourceName("siteA_pap2");
+ fpe1.setResourceName(SITE_A_PAP2);
fpe2.setFpcCount(0);
- fpe2.setResourceName("siteB_pap1");
+ fpe2.setResourceName(SITE_B_PAP1);
fpe3.setFpcCount(0);
- fpe3.setResourceName("siteB_pap2");
+ fpe3.setResourceName(SITE_B_PAP2);
logger.debug("\nIntegrityMonitorTest: Creating StateManagementEntity entries\n\n");
final StateManagementEntity sme1 = new StateManagementEntity();
final StateManagementEntity sme2 = new StateManagementEntity();
final StateManagementEntity sme3 = new StateManagementEntity();
- sme1.setResourceName("siteA_pap2");
+ sme1.setResourceName(SITE_A_PAP2);
sme1.setAdminState(StateManagement.UNLOCKED);
sme1.setOpState(StateManagement.ENABLED);
sme1.setAvailStatus(StateManagement.NULL_VALUE);
sme1.setStandbyStatus(StateManagement.NULL_VALUE);
- sme2.setResourceName("siteB_pap1");
+ sme2.setResourceName(SITE_B_PAP1);
sme2.setAdminState(StateManagement.UNLOCKED);
sme2.setOpState(StateManagement.ENABLED);
sme2.setAvailStatus(StateManagement.NULL_VALUE);
sme2.setStandbyStatus(StateManagement.NULL_VALUE);
- sme3.setResourceName("siteB_pap2");
+ sme3.setResourceName(SITE_B_PAP2);
sme3.setAdminState(StateManagement.UNLOCKED);
sme3.setOpState(StateManagement.ENABLED);
sme3.setAvailStatus(StateManagement.NULL_VALUE);
@@ -797,7 +776,7 @@ public class IntegrityMonitorTest extends IntegrityMonitorTestBase {
Query updateQuery = em.createQuery(
"UPDATE ForwardProgressEntity f " + "SET f.lastUpdated = :newDate " + "WHERE f.resourceName=:resource");
updateQuery.setParameter("newDate", staleDate, TemporalType.TIMESTAMP);
- updateQuery.setParameter("resource", fpe1.getResourceName());
+ updateQuery.setParameter(RESOURCE, fpe1.getResourceName());
et = em.getTransaction();
et.begin();
@@ -810,7 +789,7 @@ public class IntegrityMonitorTest extends IntegrityMonitorTestBase {
logger.debug("\n\n");
logger.debug("IntegrityMonitorTest:testStateAudit:ForwardProgressEntity entries");
for (ForwardProgressEntity myFpe : fpeList) {
- logger.debug("\n ResourceName: {}" + "\n LastUpdated: {}", myFpe.getResourceName(),
+ logger.debug("\n ResourceName: {}\n LastUpdated: {}", myFpe.getResourceName(),
myFpe.getLastUpdated());
}
logger.debug("\n\n");
@@ -825,8 +804,8 @@ public class IntegrityMonitorTest extends IntegrityMonitorTestBase {
StateManagementEntity tmpSme = (StateManagementEntity) mySme;
em.refresh(tmpSme);
logger.debug(
- "\n ResourceName: {}" + "\n AdminState: {}" + "\n OpState: {}"
- + "\n AvailStatus: {}" + "\n StandbyStatus: {}",
+ "\n ResourceName: {}\n AdminState: {}\n OpState: {}"
+ + "\n AvailStatus: {}\n StandbyStatus: {}",
tmpSme.getResourceName(), tmpSme.getAdminState(), tmpSme.getOpState(), tmpSme.getAvailStatus(),
tmpSme.getStandbyStatus());
}
@@ -862,7 +841,7 @@ public class IntegrityMonitorTest extends IntegrityMonitorTestBase {
updateQuery = em.createQuery(
"UPDATE ForwardProgressEntity f " + "SET f.lastUpdated = :newDate " + "WHERE f.resourceName=:resource");
updateQuery.setParameter("newDate", staleDate, TemporalType.TIMESTAMP);
- updateQuery.setParameter("resource", fpe2.getResourceName());
+ updateQuery.setParameter(RESOURCE, fpe2.getResourceName());
et = em.getTransaction();
et.begin();
@@ -901,8 +880,7 @@ public class IntegrityMonitorTest extends IntegrityMonitorTestBase {
em.refresh(sme2);
assertEquals(StateManagement.DISABLED, sme2.getOpState());
- logger.debug("\nIntegrityMonitorTest: Exit testStateAudit\n\n");
- System.out.println("\n\ntestStateAudit: Exit\n\n");
+ logger.info("\n\ntestStateAudit: Exit\n\n");
}
private IntegrityMonitor makeMonitor(String resourceName, Properties myProp) throws Exception {
@@ -912,11 +890,11 @@ public class IntegrityMonitorTest extends IntegrityMonitorTestBase {
junitSem = new Semaphore(0);
IntegrityMonitor im = new IntegrityMonitor(resourceName, myProp) {
-
+
@Override
protected void runStarted() throws InterruptedException {
monitorSem.acquire();
-
+
junitSem.release();
monitorSem.acquire();
}
@@ -925,7 +903,7 @@ public class IntegrityMonitorTest extends IntegrityMonitorTestBase {
protected void monitorCompleted() throws InterruptedException {
junitSem.release();
monitorSem.acquire();
- }
+ }
};
Whitebox.setInternalState(IntegrityMonitor.class, IM_INSTANCE_FIELD, im);
@@ -939,7 +917,7 @@ public class IntegrityMonitorTest extends IntegrityMonitorTestBase {
/**
* Waits for several monitor cycles to complete.
* @param ncycles number of cycles to wait
- *
+ *
* @throws InterruptedException if the thread is interrupted
*/
private void waitCycles(int ncycles) throws InterruptedException {
diff --git a/integrity-monitor/src/test/java/org/onap/policy/common/im/IntegrityMonitorTestBase.java b/integrity-monitor/src/test/java/org/onap/policy/common/im/IntegrityMonitorTestBase.java
index 43078432..1bb7cd96 100644
--- a/integrity-monitor/src/test/java/org/onap/policy/common/im/IntegrityMonitorTestBase.java
+++ b/integrity-monitor/src/test/java/org/onap/policy/common/im/IntegrityMonitorTestBase.java
@@ -2,14 +2,14 @@
* ============LICENSE_START=======================================================
* Integrity Audit
* ================================================================================
- * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -21,7 +21,6 @@
package org.onap.policy.common.im;
import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
import java.io.FileOutputStream;
import java.io.IOException;
@@ -50,12 +49,12 @@ import org.slf4j.LoggerFactory;
*/
public class IntegrityMonitorTestBase {
private static Logger logger = LoggerFactory.getLogger(IntegrityMonitorTestBase.class);
-
+
/**
* Name of the instance field within the IntegrityMonitor class.
*/
public static final String IM_INSTANCE_FIELD = "instance";
-
+
/**
* Name of the instance field within the MonitorTime class.
*/
@@ -80,11 +79,11 @@ public class IntegrityMonitorTestBase {
public static final String DEFAULT_DB_URL_PREFIX = "jdbc:h2:mem:";
- protected static final String dbDriver = "org.h2.Driver";
- protected static final String dbUser = "testu";
- protected static final String dbPwd = "testp";
- protected static final String siteName = "SiteA";
- protected static final String nodeType = "pap";
+ protected static final String DB_DRIVER = "org.h2.Driver";
+ protected static final String DB_USER = "testu";
+ protected static final String DB_PASS = "testp";
+ protected static final String SITE_NAME = "SiteA";
+ protected static final String NODE_TYPE = "pap";
// will be defined by the test *Classes*
protected static String dbUrl;
@@ -108,7 +107,7 @@ public class IntegrityMonitorTestBase {
* Entity manager factory pointing to the in-memory DB associated with emf.
*/
protected static EntityManager em;
-
+
/**
* Test time used by tests in lieu of CurrentTime.
*/
@@ -127,7 +126,7 @@ public class IntegrityMonitorTestBase {
/**
* Saves current configuration information and then sets new values.
- *
+ *
* @param dbUrl the URL to the DB
* @throws IOException if an IO error occurs
*/
@@ -151,17 +150,17 @@ public class IntegrityMonitorTestBase {
systemProps.put(JMX_PORT_PROP, "9797");
IntegrityMonitor.setUnitTesting(true);
-
+
testTime = new TestTime();
Whitebox.setInternalState(MonitorTime.class, TIME_INSTANCE_FIELD, testTime);
-
+
properties = new Properties();
- properties.put(IntegrityMonitorProperties.DB_DRIVER, dbDriver);
+ properties.put(IntegrityMonitorProperties.DB_DRIVER, DB_DRIVER);
properties.put(IntegrityMonitorProperties.DB_URL, dbUrl);
- properties.put(IntegrityMonitorProperties.DB_USER, dbUser);
- properties.put(IntegrityMonitorProperties.DB_PWD, dbPwd);
- properties.put(IntegrityMonitorProperties.SITE_NAME, siteName);
- properties.put(IntegrityMonitorProperties.NODE_TYPE, nodeType);
+ properties.put(IntegrityMonitorProperties.DB_USER, DB_USER);
+ properties.put(IntegrityMonitorProperties.DB_PWD, DB_PASS);
+ properties.put(IntegrityMonitorProperties.SITE_NAME, SITE_NAME);
+ properties.put(IntegrityMonitorProperties.NODE_TYPE, NODE_TYPE);
properties.put(IntegrityMonitorProperties.REFRESH_STATE_AUDIT_INTERVAL_MS,
String.valueOf(REFRESH_INTERVAL_MS));
@@ -231,12 +230,13 @@ public class IntegrityMonitorTestBase {
} catch (IntegrityMonitorException e) {
// no need to log, as exception was already logged
+ logger.debug("stopMonitor failed", e);
}
}
-
+
/**
* Get current test time.
- *
+ *
* @return the "current" time, in milliseconds
*/
protected static long getCurrentTestTime() {
@@ -245,7 +245,7 @@ public class IntegrityMonitorTestBase {
/**
* Makes a new Property set that's a clone of {@link #properties}.
- *
+ *
* @return a new Property set containing all of a copy of all of the {@link #properties}
*/
protected static Properties makeProperties() {
@@ -256,7 +256,7 @@ public class IntegrityMonitorTestBase {
/**
* Waits for a semaphore to be acquired.
- *
+ *
* @param sem semaphore to wait on
* @throws InterruptedException if the thread is interrupted
* @throws AssertionError if the semaphore was not acquired within the allotted time
@@ -264,44 +264,4 @@ public class IntegrityMonitorTestBase {
protected void waitSem(Semaphore sem) throws InterruptedException {
assertTrue(sem.tryAcquire(WAIT_MS, TimeUnit.MILLISECONDS));
}
-
- /**
- * Applies a function on an object, expecting it to succeed. Catches any exceptions thrown by
- * the function.
- *
- * @param arg the object to apply the function on
- * @param func the function
- * @throws AssertionError if an exception is thrown by the function
- */
- protected <T> void assertNoException(T arg, VoidFunction<T> func) {
- try {
- func.apply(arg);
-
- } catch (Exception e) {
- System.out.println("startTransaction exception: " + e);
- fail("action failed");
- }
- }
-
- /**
- * Applies a function on an object, expecting it to fail. Catches any exceptions thrown by the
- * function.
- *
- * @param arg the object to apply the function on
- * @param func the function
- * @throws AssertionError if no exception is thrown by the function
- */
- protected <T> void assertException(T arg, VoidFunction<T> func) {
- try {
- func.apply(arg);
- fail("missing exception");
- } catch (Exception e) {
- System.out.println("action found expected exception: " + e);
- }
- }
-
- @FunctionalInterface
- protected static interface VoidFunction<T> {
- public void apply(T arg) throws Exception;
- }
}
diff --git a/integrity-monitor/src/test/java/org/onap/policy/common/im/StateManagementEntityTest.java b/integrity-monitor/src/test/java/org/onap/policy/common/im/StateManagementEntityTest.java
index d098af99..3e482ddf 100644
--- a/integrity-monitor/src/test/java/org/onap/policy/common/im/StateManagementEntityTest.java
+++ b/integrity-monitor/src/test/java/org/onap/policy/common/im/StateManagementEntityTest.java
@@ -2,14 +2,14 @@
* ============LICENSE_START=======================================================
* Integrity Monitor
* ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -53,7 +53,7 @@ public class StateManagementEntityTest extends IntegrityMonitorTestBase {
* Tear down after the test class.
*/
@AfterClass
- public static void tearDownClass() throws Exception {
+ public static void tearDownClass() {
IntegrityMonitorTestBase.tearDownAfterClass();
}
@@ -113,29 +113,25 @@ public class StateManagementEntityTest extends IntegrityMonitorTestBase {
logger.debug("??? after commit");
}
- try {
- Query query = em.createQuery("Select p from StateManagementEntity p where p.resourceName=:resource");
-
- query.setParameter("resource", resourceName);
-
- // Just test that we are retrieving the right object
- @SuppressWarnings("rawtypes")
- List resourceList = query.getResultList();
- if (!resourceList.isEmpty()) {
- // exist
- StateManagementEntity sme2 = (StateManagementEntity) resourceList.get(0);
-
- assertEquals(sme.getResourceName(), sme2.getResourceName());
- assertEquals(sme.getAdminState(), sme2.getAdminState());
- assertEquals(sme.getOpState(), sme2.getOpState());
- assertEquals(sme.getAvailStatus(), sme2.getAvailStatus());
- assertEquals(sme.getStandbyStatus(), sme2.getStandbyStatus());
- logger.debug("--");
- } else {
- logger.debug("Record not found, resourceName: {}", resourceName);
- }
- } catch (Exception ex) {
- logger.error("Exception on select query: " + ex.toString());
+ Query query = em.createQuery("Select p from StateManagementEntity p where p.resourceName=:resource");
+
+ query.setParameter("resource", resourceName);
+
+ // Just test that we are retrieving the right object
+ @SuppressWarnings("rawtypes")
+ List resourceList = query.getResultList();
+ if (!resourceList.isEmpty()) {
+ // exist
+ StateManagementEntity sme2 = (StateManagementEntity) resourceList.get(0);
+
+ assertEquals(sme.getResourceName(), sme2.getResourceName());
+ assertEquals(sme.getAdminState(), sme2.getAdminState());
+ assertEquals(sme.getOpState(), sme2.getOpState());
+ assertEquals(sme.getAvailStatus(), sme2.getAvailStatus());
+ assertEquals(sme.getStandbyStatus(), sme2.getStandbyStatus());
+ logger.debug("--");
+ } else {
+ logger.debug("Record not found, resourceName: {}", resourceName);
}
logger.debug("\n\nJpaTest: Exit\n\n");
diff --git a/integrity-monitor/src/test/java/org/onap/policy/common/im/StateManagementTest.java b/integrity-monitor/src/test/java/org/onap/policy/common/im/StateManagementTest.java
index 9bc49861..a335b2c2 100644
--- a/integrity-monitor/src/test/java/org/onap/policy/common/im/StateManagementTest.java
+++ b/integrity-monitor/src/test/java/org/onap/policy/common/im/StateManagementTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* Integrity Monitor
* ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,6 +20,7 @@
package org.onap.policy.common.im;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.junit.Assert.assertEquals;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyString;
@@ -49,8 +50,13 @@ import org.slf4j.LoggerFactory;
* privileges and can execute time-sensitive tasks.
*/
public class StateManagementTest extends IntegrityMonitorTestBase {
-
+ private static final String LOCKED_DISABLED_FAILED_COLDSTANDBY = "locked,disabled,failed,coldstandby";
+ private static final String UNLOCKED_DISABLED_FAILED_COLDSTANDBY = "unlocked,disabled,failed,coldstandby";
+ private static final String UNLOCKED_ENABLED_NULL_HOTSTANDBY = "unlocked,enabled,null,hotstandby";
+ private static final String UNLOCKED_ENABLED_NULL_NULL = "unlocked,enabled,null,null";
+ private static final String UNLOCKED_ENABLED_NULL_PROVIDINGSERVICE = "unlocked,enabled,null,providingservice";
private static final String TEST_RESOURCE_NAME = "test_resource1";
+
private static Logger logger = LoggerFactory.getLogger(StateManagementTest.class);
//
@@ -61,7 +67,7 @@ public class StateManagementTest extends IntegrityMonitorTestBase {
}
@AfterClass
- public static void tearDownClass() throws Exception {
+ public static void tearDownClass() {
IntegrityMonitorTestBase.tearDownAfterClass();
}
@@ -85,7 +91,7 @@ public class StateManagementTest extends IntegrityMonitorTestBase {
final StateManagement sm = new StateManagement(emf, resourceName);
logger.info("\n??? initial state");
- assertEquals("unlocked,enabled,null,null", makeString(sm));
+ assertEquals(UNLOCKED_ENABLED_NULL_NULL, makeString(sm));
logger.info("\n??? test lock()");
sm.lock();
@@ -93,11 +99,11 @@ public class StateManagementTest extends IntegrityMonitorTestBase {
logger.info("\n??? test unlock()");
sm.unlock();
- assertEquals("unlocked,enabled,null,null", makeString(sm));
+ assertEquals(UNLOCKED_ENABLED_NULL_NULL, makeString(sm));
logger.info("\n??? test enableNotFailed()");
sm.enableNotFailed();
- assertEquals("unlocked,enabled,null,null", makeString(sm));
+ assertEquals(UNLOCKED_ENABLED_NULL_NULL, makeString(sm));
logger.info("\n??? test disableFailed()");
sm.disableFailed();
@@ -108,22 +114,20 @@ public class StateManagementTest extends IntegrityMonitorTestBase {
// the standbystatus shall transition to coldstandby and a
// StandbyStatusException shall be thrown
logger.info("\n??? promote() test case P4");
- assertException(sm, smx -> {
+ assertThatThrownBy(() -> {
sm.disableFailed();
sm.lock();
sm.promote();
});
- assertEquals("locked,disabled,failed,coldstandby", makeString(sm));
+ assertEquals(LOCKED_DISABLED_FAILED_COLDSTANDBY, makeString(sm));
// P3 If promote() is called while standbyStatus is coldstandby, the
// state shall not transition
// and a StandbyStatusException shall be thrown
logger.info("\n??? promote() test case P3");
- assertException(sm, smx -> {
- sm.promote();
- });
- assertEquals("locked,disabled,failed,coldstandby", makeString(sm));
+ assertThatThrownBy(sm::promote);
+ assertEquals(LOCKED_DISABLED_FAILED_COLDSTANDBY, makeString(sm));
// P2 If promote() is called while the standbyStatus is null and the
// opState is enabled and adminState is unlocked,
@@ -133,27 +137,27 @@ public class StateManagementTest extends IntegrityMonitorTestBase {
final StateManagement sm2 = new StateManagement(emf, resourceName);
sm2.enableNotFailed();
sm2.unlock();
- assertEquals("unlocked,enabled,null,null", makeString(sm2));
+ assertEquals(UNLOCKED_ENABLED_NULL_NULL, makeString(sm2));
sm2.promote();
- assertEquals("unlocked,enabled,null,providingservice", makeString(sm2));
+ assertEquals(UNLOCKED_ENABLED_NULL_PROVIDINGSERVICE, makeString(sm2));
// P5 If promote() is called while standbyStatus is
// providingservice, no action is taken
logger.info("\n??? promote() test case P5");
sm2.promote();
- assertEquals("unlocked,enabled,null,providingservice", makeString(sm2));
+ assertEquals(UNLOCKED_ENABLED_NULL_PROVIDINGSERVICE, makeString(sm2));
// D1 If demote() is called while standbyStatus is providingservice,
// the state shall transition to hotstandby
logger.info("\n??? demote() test case D1");
sm2.demote();
- assertEquals("unlocked,enabled,null,hotstandby", makeString(sm2));
+ assertEquals(UNLOCKED_ENABLED_NULL_HOTSTANDBY, makeString(sm2));
// D4 If demote() is called while standbyStatus is hotstandby, no
// action is taken
logger.info("\n??? demote() test case D4");
sm2.demote();
- assertEquals("unlocked,enabled,null,hotstandby", makeString(sm2));
+ assertEquals(UNLOCKED_ENABLED_NULL_HOTSTANDBY, makeString(sm2));
// D3 If demote() is called while standbyStatus is null and
// adminState is locked or opState is disabled,
@@ -164,13 +168,13 @@ public class StateManagementTest extends IntegrityMonitorTestBase {
sm3.lock();
sm3.disableFailed();
sm3.demote();
- assertEquals("locked,disabled,failed,coldstandby", makeString(sm3));
+ assertEquals(LOCKED_DISABLED_FAILED_COLDSTANDBY, makeString(sm3));
// D5 If demote() is called while standbyStatus is coldstandby, no
// action is taken
logger.info("\n??? demote() test case D5");
sm3.demote();
- assertEquals("locked,disabled,failed,coldstandby", makeString(sm3));
+ assertEquals(LOCKED_DISABLED_FAILED_COLDSTANDBY, makeString(sm3));
// D2 If demote() is called while standbyStatus is null and
// adminState is unlocked and opState is enabled,
@@ -180,44 +184,42 @@ public class StateManagementTest extends IntegrityMonitorTestBase {
final StateManagement sm4 = new StateManagement(emf, resourceName);
sm4.unlock();
sm4.enableNotFailed();
- assertEquals("unlocked,enabled,null,null", makeString(sm4));
+ assertEquals(UNLOCKED_ENABLED_NULL_NULL, makeString(sm4));
sm4.demote();
- assertEquals("unlocked,enabled,null,hotstandby", makeString(sm4));
+ assertEquals(UNLOCKED_ENABLED_NULL_HOTSTANDBY, makeString(sm4));
// P1 If promote() is called while standbyStatus is hotstandby, the
// state shall transition to providingservice.
logger.info("\n??? promote() test case P1");
sm4.promote();
- assertEquals("unlocked,enabled,null,providingservice", makeString(sm4));
+ assertEquals(UNLOCKED_ENABLED_NULL_PROVIDINGSERVICE, makeString(sm4));
// State change notification
logger.info("\n??? State change notification test case 1 - lock()");
final StateChangeNotifier stateChangeNotifier = new StateChangeNotifier();
sm.addObserver(stateChangeNotifier);
sm.lock();
- assertEquals("locked,disabled,failed,coldstandby", makeString(stateChangeNotifier.getStateManagement()));
+ assertEquals(LOCKED_DISABLED_FAILED_COLDSTANDBY, makeString(stateChangeNotifier.getStateManagement()));
logger.info("\n??? State change notification test case 2 - unlock()");
sm.unlock();
- assertEquals("unlocked,disabled,failed,coldstandby", makeString(stateChangeNotifier.getStateManagement()));
+ assertEquals(UNLOCKED_DISABLED_FAILED_COLDSTANDBY, makeString(stateChangeNotifier.getStateManagement()));
logger.info("\n??? State change notification test case 3 - enabled()");
sm.enableNotFailed();
- assertEquals("unlocked,enabled,null,hotstandby", makeString(stateChangeNotifier.getStateManagement()));
+ assertEquals(UNLOCKED_ENABLED_NULL_HOTSTANDBY, makeString(stateChangeNotifier.getStateManagement()));
logger.info("\n??? State change notification test case 4 - disableFailed()");
sm.disableFailed();
- assertEquals("unlocked,disabled,failed,coldstandby", makeString(stateChangeNotifier.getStateManagement()));
+ assertEquals(UNLOCKED_DISABLED_FAILED_COLDSTANDBY, makeString(stateChangeNotifier.getStateManagement()));
logger.info("\n??? State change notification test case 5 - demote()");
sm.demote();
- assertEquals("unlocked,disabled,failed,coldstandby", makeString(stateChangeNotifier.getStateManagement()));
+ assertEquals(UNLOCKED_DISABLED_FAILED_COLDSTANDBY, makeString(stateChangeNotifier.getStateManagement()));
logger.info("\n??? State change notification test case 6 - promote()");
- assertException(sm, smx -> {
- sm.promote();
- });
- assertEquals("unlocked,disabled,failed,coldstandby", makeString(sm));
+ assertThatThrownBy(sm::promote);
+ assertEquals(UNLOCKED_DISABLED_FAILED_COLDSTANDBY, makeString(sm));
} catch (final Exception ex) {
logger.error("Exception: {}", ex.toString());
diff --git a/integrity-monitor/src/test/java/org/onap/policy/common/im/StateTransitionTest.java b/integrity-monitor/src/test/java/org/onap/policy/common/im/StateTransitionTest.java
index ff7cc3bd..5926bd8f 100644
--- a/integrity-monitor/src/test/java/org/onap/policy/common/im/StateTransitionTest.java
+++ b/integrity-monitor/src/test/java/org/onap/policy/common/im/StateTransitionTest.java
@@ -2,14 +2,14 @@
* ============LICENSE_START=======================================================
* Integrity Monitor
* ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -22,10 +22,6 @@ package org.onap.policy.common.im;
import static org.junit.Assert.assertEquals;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.BeforeClass;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -36,2112 +32,2104 @@ import org.slf4j.LoggerFactory;
* tasks.
*/
public class StateTransitionTest {
+ private static final String HOTSTANDBY = "hotstandby";
+ private static final String LOCKED = "locked";
+ private static final String PROMOTE = "promote";
+ private static final String PROVIDINGSERVICE = "providingservice";
+ private static final String UNLOCK = "unlock";
+ private static final String UNLOCKED = "unlocked";
+ private static final String COLDSTANDBY = "coldstandby";
+ private static final String DEMOTE = "demote";
+ private static final String DEPENDENCY = "dependency";
+ private static final String DEPENDENCY_FAILED = "dependency,failed";
+ private static final String DISABLE_DEPENDENCY = "disableDependency";
+ private static final String DISABLE_FAILED = "disableFailed";
+ private static final String DISABLED = "disabled";
+ private static final String ENABLE_NO_DEPENDENCY = "enableNoDependency";
+ private static final String ENABLE_NOT_FAILED = "enableNotFailed";
+ private static final String ENABLED = "enabled";
+ private static final String FAILED = "failed";
private static Logger logger = LoggerFactory.getLogger(StateTransitionTest.class);
- @BeforeClass
- public static void setUpClass() throws Exception {
+ @Test
+ public void test() throws StateTransitionException {
+ logger.info("\n\nlogger.infor StateTransitionTest: Entering\n\n");
+ logger.info("??? create a new StateTransition");
+ StateTransition st = new StateTransition();
- }
+ StateElement se = null;
- @AfterClass
- public static void tearDownClass() throws Exception {}
+ // bad test case
+ se = st.getEndingState(UNLOCKED, ENABLED, "null", COLDSTANDBY, "lock");
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- @Before
- public void setUp() throws Exception {}
+ logger.info("??? StateTransition testcase 1");
+ se = st.getEndingState(UNLOCKED, ENABLED, "null", "null", "lock");
+ assertEquals("null,locked,enabled,null,", makeString(se));
- @After
- public void tearDown() throws Exception {}
+ logger.info("??? StateTransition testcase 2");
+ se = st.getEndingState(UNLOCKED, ENABLED, "null", "null", UNLOCK);
+ assertEquals("null,unlocked,enabled,null,", makeString(se));
- @Test
- public void test() throws Exception {
- logger.info("\n\nlogger.infor StateTransitionTest: Entering\n\n");
- try {
- logger.info("??? create a new StateTransition");
- StateTransition st = new StateTransition();
-
- StateElement se = null;
- try {
- // bad test case
- se = st.getEndingState("unlocked", "enabled", "null", "coldstandby", "lock");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 3");
+ se = st.getEndingState(UNLOCKED, ENABLED, "null", "null", DISABLE_FAILED);
+ assertEquals("null,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 1");
- se = st.getEndingState("unlocked", "enabled", "null", "null", "lock");
- assertEquals("null,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 4");
+ se = st.getEndingState(UNLOCKED, ENABLED, "null", "null", ENABLE_NOT_FAILED);
+ assertEquals("null,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 2");
- se = st.getEndingState("unlocked", "enabled", "null", "null", "unlock");
- assertEquals("null,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 5");
+ se = st.getEndingState(UNLOCKED, ENABLED, "null", "null", DISABLE_DEPENDENCY);
+ assertEquals("null,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 3");
- se = st.getEndingState("unlocked", "enabled", "null", "null", "disableFailed");
- assertEquals("null,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 6");
+ se = st.getEndingState(UNLOCKED, ENABLED, "null", "null", ENABLE_NO_DEPENDENCY);
+ assertEquals("null,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 4");
- se = st.getEndingState("unlocked", "enabled", "null", "null", "enableNotFailed");
- assertEquals("null,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 7");
+ se = st.getEndingState(UNLOCKED, ENABLED, "null", "null", PROMOTE);
+ assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 5");
- se = st.getEndingState("unlocked", "enabled", "null", "null", "disableDependency");
- assertEquals("null,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 8");
+ se = st.getEndingState(UNLOCKED, ENABLED, "null", "null", DEMOTE);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 6");
- se = st.getEndingState("unlocked", "enabled", "null", "null", "enableNoDependency");
- assertEquals("null,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 9");
+ se = st.getEndingState(UNLOCKED, ENABLED, "null", COLDSTANDBY, DEMOTE);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 7");
- se = st.getEndingState("unlocked", "enabled", "null", "null", "promote");
- assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 10");
+ se = st.getEndingState(UNLOCKED, ENABLED, "null", COLDSTANDBY, UNLOCK);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 8");
- se = st.getEndingState("unlocked", "enabled", "null", "null", "demote");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 11");
+ se = st.getEndingState(UNLOCKED, ENABLED, "null", COLDSTANDBY, DISABLE_FAILED);
+ assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 9");
- se = st.getEndingState("unlocked", "enabled", "null", "coldstandby", "demote");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 12");
+ se = st.getEndingState(UNLOCKED, ENABLED, "null", COLDSTANDBY, ENABLE_NOT_FAILED);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 10");
- se = st.getEndingState("unlocked", "enabled", "null", "coldstandby", "unlock");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 13");
+ se = st.getEndingState(UNLOCKED, ENABLED, "null", COLDSTANDBY, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 11");
- se = st.getEndingState("unlocked", "enabled", "null", "coldstandby", "disableFailed");
- assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 14");
+ se = st.getEndingState(UNLOCKED, ENABLED, "null", COLDSTANDBY, ENABLE_NO_DEPENDENCY);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 12");
- se = st.getEndingState("unlocked", "enabled", "null", "coldstandby", "enableNotFailed");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 15");
+ se = st.getEndingState(UNLOCKED, ENABLED, "null", COLDSTANDBY, PROMOTE);
+ assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 13");
- se = st.getEndingState("unlocked", "enabled", "null", "coldstandby", "disableDependency");
- assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 16");
+ se = st.getEndingState(UNLOCKED, ENABLED, "null", COLDSTANDBY, DEMOTE);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 14");
- se = st.getEndingState("unlocked", "enabled", "null", "coldstandby", "enableNoDependency");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 17");
+ se = st.getEndingState(UNLOCKED, ENABLED, "null", HOTSTANDBY, DEMOTE);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 15");
- se = st.getEndingState("unlocked", "enabled", "null", "coldstandby", "promote");
- assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 18");
+ se = st.getEndingState(UNLOCKED, ENABLED, "null", HOTSTANDBY, UNLOCK);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 16");
- se = st.getEndingState("unlocked", "enabled", "null", "coldstandby", "demote");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 19");
+ se = st.getEndingState(UNLOCKED, ENABLED, "null", HOTSTANDBY, DISABLE_FAILED);
+ assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 17");
- se = st.getEndingState("unlocked", "enabled", "null", "hotstandby", "demote");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 20");
+ se = st.getEndingState(UNLOCKED, ENABLED, "null", HOTSTANDBY, ENABLE_NOT_FAILED);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 18");
- se = st.getEndingState("unlocked", "enabled", "null", "hotstandby", "unlock");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 21");
+ se = st.getEndingState(UNLOCKED, ENABLED, "null", HOTSTANDBY, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 19");
- se = st.getEndingState("unlocked", "enabled", "null", "hotstandby", "disableFailed");
- assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 22");
+ se = st.getEndingState(UNLOCKED, ENABLED, "null", HOTSTANDBY, ENABLE_NO_DEPENDENCY);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 20");
- se = st.getEndingState("unlocked", "enabled", "null", "hotstandby", "enableNotFailed");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 23");
+ se = st.getEndingState(UNLOCKED, ENABLED, "null", HOTSTANDBY, PROMOTE);
+ assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 21");
- se = st.getEndingState("unlocked", "enabled", "null", "hotstandby", "disableDependency");
- assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 24");
+ se = st.getEndingState(UNLOCKED, ENABLED, "null", HOTSTANDBY, DEMOTE);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 22");
- se = st.getEndingState("unlocked", "enabled", "null", "hotstandby", "enableNoDependency");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 25");
+ se = st.getEndingState(UNLOCKED, ENABLED, "null", PROVIDINGSERVICE, DEMOTE);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 23");
- se = st.getEndingState("unlocked", "enabled", "null", "hotstandby", "promote");
- assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 26");
+ se = st.getEndingState(UNLOCKED, ENABLED, "null", PROVIDINGSERVICE, UNLOCK);
+ assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 24");
- se = st.getEndingState("unlocked", "enabled", "null", "hotstandby", "demote");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 27");
+ se = st.getEndingState(UNLOCKED, ENABLED, "null", PROVIDINGSERVICE, DISABLE_FAILED);
+ assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 25");
- se = st.getEndingState("unlocked", "enabled", "null", "providingservice", "demote");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 28");
+ se = st.getEndingState(UNLOCKED, ENABLED, "null", PROVIDINGSERVICE, ENABLE_NOT_FAILED);
+ assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 26");
- se = st.getEndingState("unlocked", "enabled", "null", "providingservice", "unlock");
- assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 29");
+ se = st.getEndingState(UNLOCKED, ENABLED, "null", PROVIDINGSERVICE, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 27");
- se = st.getEndingState("unlocked", "enabled", "null", "providingservice", "disableFailed");
- assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 30");
+ se = st.getEndingState(UNLOCKED, ENABLED, "null", PROVIDINGSERVICE, ENABLE_NO_DEPENDENCY);
+ assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 28");
- se = st.getEndingState("unlocked", "enabled", "null", "providingservice", "enableNotFailed");
- assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 31");
+ se = st.getEndingState(UNLOCKED, ENABLED, "null", PROVIDINGSERVICE, PROMOTE);
+ assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 29");
- se = st.getEndingState("unlocked", "enabled", "null", "providingservice", "disableDependency");
- assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 32");
+ se = st.getEndingState(UNLOCKED, ENABLED, "null", PROVIDINGSERVICE, DEMOTE);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 30");
- se = st.getEndingState("unlocked", "enabled", "null", "providingservice", "enableNoDependency");
- assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 33");
+ se = st.getEndingState(UNLOCKED, ENABLED, FAILED, "null", DEMOTE);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 31");
- se = st.getEndingState("unlocked", "enabled", "null", "providingservice", "promote");
- assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 34");
+ se = st.getEndingState(UNLOCKED, ENABLED, FAILED, "null", UNLOCK);
+ assertEquals("null,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 32");
- se = st.getEndingState("unlocked", "enabled", "null", "providingservice", "demote");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 35");
+ se = st.getEndingState(UNLOCKED, ENABLED, FAILED, "null", DISABLE_FAILED);
+ assertEquals("null,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 33");
- se = st.getEndingState("unlocked", "enabled", "failed", "null", "demote");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 36");
+ se = st.getEndingState(UNLOCKED, ENABLED, FAILED, "null", ENABLE_NOT_FAILED);
+ assertEquals("null,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 34");
- se = st.getEndingState("unlocked", "enabled", "failed", "null", "unlock");
- assertEquals("null,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 37");
+ se = st.getEndingState(UNLOCKED, ENABLED, FAILED, "null", DISABLE_DEPENDENCY);
+ assertEquals("null,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 35");
- se = st.getEndingState("unlocked", "enabled", "failed", "null", "disableFailed");
- assertEquals("null,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 38");
+ se = st.getEndingState(UNLOCKED, ENABLED, FAILED, "null", ENABLE_NO_DEPENDENCY);
+ assertEquals("null,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 36");
- se = st.getEndingState("unlocked", "enabled", "failed", "null", "enableNotFailed");
- assertEquals("null,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 39");
+ se = st.getEndingState(UNLOCKED, ENABLED, FAILED, "null", PROMOTE);
+ assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 37");
- se = st.getEndingState("unlocked", "enabled", "failed", "null", "disableDependency");
- assertEquals("null,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 40");
+ se = st.getEndingState(UNLOCKED, ENABLED, FAILED, "null", DEMOTE);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 38");
- se = st.getEndingState("unlocked", "enabled", "failed", "null", "enableNoDependency");
- assertEquals("null,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 41");
+ se = st.getEndingState(UNLOCKED, ENABLED, FAILED, COLDSTANDBY, DEMOTE);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 39");
- se = st.getEndingState("unlocked", "enabled", "failed", "null", "promote");
- assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 42");
+ se = st.getEndingState(UNLOCKED, ENABLED, FAILED, COLDSTANDBY, UNLOCK);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 40");
- se = st.getEndingState("unlocked", "enabled", "failed", "null", "demote");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 43");
+ se = st.getEndingState(UNLOCKED, ENABLED, FAILED, COLDSTANDBY, DISABLE_FAILED);
+ assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 41");
- se = st.getEndingState("unlocked", "enabled", "failed", "coldstandby", "demote");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 44");
+ se = st.getEndingState(UNLOCKED, ENABLED, FAILED, COLDSTANDBY, ENABLE_NOT_FAILED);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 42");
- se = st.getEndingState("unlocked", "enabled", "failed", "coldstandby", "unlock");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 45");
+ se = st.getEndingState(UNLOCKED, ENABLED, FAILED, COLDSTANDBY, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 43");
- se = st.getEndingState("unlocked", "enabled", "failed", "coldstandby", "disableFailed");
- assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 46");
+ se = st.getEndingState(UNLOCKED, ENABLED, FAILED, COLDSTANDBY, ENABLE_NO_DEPENDENCY);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 44");
- se = st.getEndingState("unlocked", "enabled", "failed", "coldstandby", "enableNotFailed");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 47");
+ se = st.getEndingState(UNLOCKED, ENABLED, FAILED, COLDSTANDBY, PROMOTE);
+ assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 45");
- se = st.getEndingState("unlocked", "enabled", "failed", "coldstandby", "disableDependency");
- assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 48");
+ se = st.getEndingState(UNLOCKED, ENABLED, FAILED, COLDSTANDBY, DEMOTE);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 46");
- se = st.getEndingState("unlocked", "enabled", "failed", "coldstandby", "enableNoDependency");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 49");
+ se = st.getEndingState(UNLOCKED, ENABLED, FAILED, HOTSTANDBY, DEMOTE);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 47");
- se = st.getEndingState("unlocked", "enabled", "failed", "coldstandby", "promote");
- assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 50");
+ se = st.getEndingState(UNLOCKED, ENABLED, FAILED, HOTSTANDBY, UNLOCK);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 48");
- se = st.getEndingState("unlocked", "enabled", "failed", "coldstandby", "demote");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 51");
+ se = st.getEndingState(UNLOCKED, ENABLED, FAILED, HOTSTANDBY, DISABLE_FAILED);
+ assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 49");
- se = st.getEndingState("unlocked", "enabled", "failed", "hotstandby", "demote");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 52");
+ se = st.getEndingState(UNLOCKED, ENABLED, FAILED, HOTSTANDBY, ENABLE_NOT_FAILED);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 50");
- se = st.getEndingState("unlocked", "enabled", "failed", "hotstandby", "unlock");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 53");
+ se = st.getEndingState(UNLOCKED, ENABLED, FAILED, HOTSTANDBY, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 51");
- se = st.getEndingState("unlocked", "enabled", "failed", "hotstandby", "disableFailed");
- assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 54");
+ se = st.getEndingState(UNLOCKED, ENABLED, FAILED, HOTSTANDBY, ENABLE_NO_DEPENDENCY);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 52");
- se = st.getEndingState("unlocked", "enabled", "failed", "hotstandby", "enableNotFailed");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 55");
+ se = st.getEndingState(UNLOCKED, ENABLED, FAILED, HOTSTANDBY, PROMOTE);
+ assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 53");
- se = st.getEndingState("unlocked", "enabled", "failed", "hotstandby", "disableDependency");
- assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 56");
+ se = st.getEndingState(UNLOCKED, ENABLED, FAILED, HOTSTANDBY, DEMOTE);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 54");
- se = st.getEndingState("unlocked", "enabled", "failed", "hotstandby", "enableNoDependency");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 57");
+ se = st.getEndingState(UNLOCKED, ENABLED, FAILED, PROVIDINGSERVICE, DEMOTE);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 55");
- se = st.getEndingState("unlocked", "enabled", "failed", "hotstandby", "promote");
- assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 58");
+ se = st.getEndingState(UNLOCKED, ENABLED, FAILED, PROVIDINGSERVICE, UNLOCK);
+ assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 56");
- se = st.getEndingState("unlocked", "enabled", "failed", "hotstandby", "demote");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 59");
+ se = st.getEndingState(UNLOCKED, ENABLED, FAILED, PROVIDINGSERVICE, DISABLE_FAILED);
+ assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 57");
- se = st.getEndingState("unlocked", "enabled", "failed", "providingservice", "demote");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 60");
+ se = st.getEndingState(UNLOCKED, ENABLED, FAILED, PROVIDINGSERVICE, ENABLE_NOT_FAILED);
+ assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 58");
- se = st.getEndingState("unlocked", "enabled", "failed", "providingservice", "unlock");
- assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 61");
+ se = st.getEndingState(UNLOCKED, ENABLED, FAILED, PROVIDINGSERVICE, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 59");
- se = st.getEndingState("unlocked", "enabled", "failed", "providingservice", "disableFailed");
- assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 62");
+ se = st.getEndingState(UNLOCKED, ENABLED, FAILED, PROVIDINGSERVICE, ENABLE_NO_DEPENDENCY);
+ assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 60");
- se = st.getEndingState("unlocked", "enabled", "failed", "providingservice", "enableNotFailed");
- assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 63");
+ se = st.getEndingState(UNLOCKED, ENABLED, FAILED, PROVIDINGSERVICE, PROMOTE);
+ assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 61");
- se = st.getEndingState("unlocked", "enabled", "failed", "providingservice", "disableDependency");
- assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 64");
+ se = st.getEndingState(UNLOCKED, ENABLED, FAILED, PROVIDINGSERVICE, DEMOTE);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 62");
- se = st.getEndingState("unlocked", "enabled", "failed", "providingservice", "enableNoDependency");
- assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 65");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY, "null", DEMOTE);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 63");
- se = st.getEndingState("unlocked", "enabled", "failed", "providingservice", "promote");
- assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 66");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY, "null", UNLOCK);
+ assertEquals("null,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 64");
- se = st.getEndingState("unlocked", "enabled", "failed", "providingservice", "demote");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 67");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY, "null", DISABLE_FAILED);
+ assertEquals("null,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 65");
- se = st.getEndingState("unlocked", "enabled", "dependency", "null", "demote");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 68");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY, "null", ENABLE_NOT_FAILED);
+ assertEquals("null,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 66");
- se = st.getEndingState("unlocked", "enabled", "dependency", "null", "unlock");
- assertEquals("null,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 69");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY, "null", DISABLE_DEPENDENCY);
+ assertEquals("null,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 67");
- se = st.getEndingState("unlocked", "enabled", "dependency", "null", "disableFailed");
- assertEquals("null,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 70");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY, "null", ENABLE_NO_DEPENDENCY);
+ assertEquals("null,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 68");
- se = st.getEndingState("unlocked", "enabled", "dependency", "null", "enableNotFailed");
- assertEquals("null,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 71");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY, "null", PROMOTE);
+ assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 69");
- se = st.getEndingState("unlocked", "enabled", "dependency", "null", "disableDependency");
- assertEquals("null,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 72");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY, "null", DEMOTE);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 70");
- se = st.getEndingState("unlocked", "enabled", "dependency", "null", "enableNoDependency");
- assertEquals("null,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 73");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY, COLDSTANDBY, DEMOTE);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 71");
- se = st.getEndingState("unlocked", "enabled", "dependency", "null", "promote");
- assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 74");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY, COLDSTANDBY, UNLOCK);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 72");
- se = st.getEndingState("unlocked", "enabled", "dependency", "null", "demote");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 75");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY, COLDSTANDBY, DISABLE_FAILED);
+ assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 73");
- se = st.getEndingState("unlocked", "enabled", "dependency", "coldstandby", "demote");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 76");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY, COLDSTANDBY, ENABLE_NOT_FAILED);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 74");
- se = st.getEndingState("unlocked", "enabled", "dependency", "coldstandby", "unlock");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 77");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY, COLDSTANDBY, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 75");
- se = st.getEndingState("unlocked", "enabled", "dependency", "coldstandby", "disableFailed");
- assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 78");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY, COLDSTANDBY, ENABLE_NO_DEPENDENCY);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 76");
- se = st.getEndingState("unlocked", "enabled", "dependency", "coldstandby", "enableNotFailed");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 79");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY, COLDSTANDBY, PROMOTE);
+ assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 77");
- se = st.getEndingState("unlocked", "enabled", "dependency", "coldstandby", "disableDependency");
- assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 80");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY, COLDSTANDBY, DEMOTE);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 78");
- se = st.getEndingState("unlocked", "enabled", "dependency", "coldstandby", "enableNoDependency");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 81");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY, HOTSTANDBY, DEMOTE);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 79");
- se = st.getEndingState("unlocked", "enabled", "dependency", "coldstandby", "promote");
- assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 82");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY, HOTSTANDBY, UNLOCK);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 80");
- se = st.getEndingState("unlocked", "enabled", "dependency", "coldstandby", "demote");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 83");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY, HOTSTANDBY, DISABLE_FAILED);
+ assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 81");
- se = st.getEndingState("unlocked", "enabled", "dependency", "hotstandby", "demote");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 84");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY, HOTSTANDBY, ENABLE_NOT_FAILED);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 82");
- se = st.getEndingState("unlocked", "enabled", "dependency", "hotstandby", "unlock");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 85");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY, HOTSTANDBY, DISABLE_DEPENDENCY);
+ assertEquals("hotstandby,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 83");
- se = st.getEndingState("unlocked", "enabled", "dependency", "hotstandby", "disableFailed");
- assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 86");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY, HOTSTANDBY, ENABLE_NO_DEPENDENCY);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 84");
- se = st.getEndingState("unlocked", "enabled", "dependency", "hotstandby", "enableNotFailed");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 87");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY, HOTSTANDBY, PROMOTE);
+ assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 85");
- se = st.getEndingState("unlocked", "enabled", "dependency", "hotstandby", "disableDependency");
- assertEquals("hotstandby,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 88");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY, HOTSTANDBY, DEMOTE);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 86");
- se = st.getEndingState("unlocked", "enabled", "dependency", "hotstandby", "enableNoDependency");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 89");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY, PROVIDINGSERVICE, DEMOTE);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 87");
- se = st.getEndingState("unlocked", "enabled", "dependency", "hotstandby", "promote");
- assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 90");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY, PROVIDINGSERVICE, UNLOCK);
+ assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 88");
- se = st.getEndingState("unlocked", "enabled", "dependency", "hotstandby", "demote");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 91");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY, PROVIDINGSERVICE, DISABLE_FAILED);
+ assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 89");
- se = st.getEndingState("unlocked", "enabled", "dependency", "providingservice", "demote");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 92");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY, PROVIDINGSERVICE, ENABLE_NOT_FAILED);
+ assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 90");
- se = st.getEndingState("unlocked", "enabled", "dependency", "providingservice", "unlock");
- assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 93");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY, PROVIDINGSERVICE, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 91");
- se = st.getEndingState("unlocked", "enabled", "dependency", "providingservice", "disableFailed");
- assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 94");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY, PROVIDINGSERVICE, ENABLE_NO_DEPENDENCY);
+ assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 92");
- se = st.getEndingState("unlocked", "enabled", "dependency", "providingservice", "enableNotFailed");
- assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 95");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY, PROVIDINGSERVICE, PROMOTE);
+ assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 93");
- se = st.getEndingState("unlocked", "enabled", "dependency", "providingservice", "disableDependency");
- assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 96");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY, PROVIDINGSERVICE, DEMOTE);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 94");
- se = st.getEndingState("unlocked", "enabled", "dependency", "providingservice", "enableNoDependency");
- assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 97");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY_FAILED, "null", DEMOTE);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 95");
- se = st.getEndingState("unlocked", "enabled", "dependency", "providingservice", "promote");
- assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 98");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY_FAILED, "null", UNLOCK);
+ assertEquals("null,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 96");
- se = st.getEndingState("unlocked", "enabled", "dependency", "providingservice", "demote");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 99");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY_FAILED, "null", DISABLE_FAILED);
+ assertEquals("null,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 97");
- se = st.getEndingState("unlocked", "enabled", "dependency,failed", "null", "demote");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 100");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY_FAILED, "null", ENABLE_NOT_FAILED);
+ assertEquals("null,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 98");
- se = st.getEndingState("unlocked", "enabled", "dependency,failed", "null", "unlock");
- assertEquals("null,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 101");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY_FAILED, "null", DISABLE_DEPENDENCY);
+ assertEquals("null,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 99");
- se = st.getEndingState("unlocked", "enabled", "dependency,failed", "null", "disableFailed");
- assertEquals("null,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 102");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY_FAILED, "null", ENABLE_NO_DEPENDENCY);
+ assertEquals("null,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 100");
- se = st.getEndingState("unlocked", "enabled", "dependency,failed", "null", "enableNotFailed");
- assertEquals("null,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 103");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY_FAILED, "null", PROMOTE);
+ assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 101");
- se = st.getEndingState("unlocked", "enabled", "dependency,failed", "null", "disableDependency");
- assertEquals("null,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 104");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY_FAILED, "null", DEMOTE);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 102");
- se = st.getEndingState("unlocked", "enabled", "dependency,failed", "null", "enableNoDependency");
- assertEquals("null,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 105");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY_FAILED, COLDSTANDBY, DEMOTE);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 103");
- se = st.getEndingState("unlocked", "enabled", "dependency,failed", "null", "promote");
- assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 106");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY_FAILED, COLDSTANDBY, UNLOCK);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 104");
- se = st.getEndingState("unlocked", "enabled", "dependency,failed", "null", "demote");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 107");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY_FAILED, COLDSTANDBY, DISABLE_FAILED);
+ assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 105");
- se = st.getEndingState("unlocked", "enabled", "dependency,failed", "coldstandby", "demote");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 108");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY_FAILED, COLDSTANDBY, ENABLE_NOT_FAILED);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 106");
- se = st.getEndingState("unlocked", "enabled", "dependency,failed", "coldstandby", "unlock");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 109");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY_FAILED, COLDSTANDBY, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 107");
- se = st.getEndingState("unlocked", "enabled", "dependency,failed", "coldstandby", "disableFailed");
- assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 110");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY_FAILED, COLDSTANDBY, ENABLE_NO_DEPENDENCY);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 108");
- se = st.getEndingState("unlocked", "enabled", "dependency,failed", "coldstandby", "enableNotFailed");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 111");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY_FAILED, COLDSTANDBY, PROMOTE);
+ assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 109");
- se = st.getEndingState("unlocked", "enabled", "dependency,failed", "coldstandby", "disableDependency");
- assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 112");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY_FAILED, COLDSTANDBY, DEMOTE);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 110");
- se = st.getEndingState("unlocked", "enabled", "dependency,failed", "coldstandby", "enableNoDependency");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 113");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY_FAILED, HOTSTANDBY, DEMOTE);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 111");
- se = st.getEndingState("unlocked", "enabled", "dependency,failed", "coldstandby", "promote");
- assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 114");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY_FAILED, HOTSTANDBY, UNLOCK);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 112");
- se = st.getEndingState("unlocked", "enabled", "dependency,failed", "coldstandby", "demote");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 115");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY_FAILED, HOTSTANDBY, DISABLE_FAILED);
+ assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 113");
- se = st.getEndingState("unlocked", "enabled", "dependency,failed", "hotstandby", "demote");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 116");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY_FAILED, HOTSTANDBY, ENABLE_NOT_FAILED);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 114");
- se = st.getEndingState("unlocked", "enabled", "dependency,failed", "hotstandby", "unlock");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 117");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY_FAILED, HOTSTANDBY, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 115");
- se = st.getEndingState("unlocked", "enabled", "dependency,failed", "hotstandby", "disableFailed");
- assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 118");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY_FAILED, HOTSTANDBY, ENABLE_NO_DEPENDENCY);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 116");
- se = st.getEndingState("unlocked", "enabled", "dependency,failed", "hotstandby", "enableNotFailed");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 119");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY_FAILED, HOTSTANDBY, PROMOTE);
+ assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 117");
- se = st.getEndingState("unlocked", "enabled", "dependency,failed", "hotstandby", "disableDependency");
- assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 120");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY_FAILED, HOTSTANDBY, DEMOTE);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 118");
- se = st.getEndingState("unlocked", "enabled", "dependency,failed", "hotstandby", "enableNoDependency");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 121");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY_FAILED, PROVIDINGSERVICE, DEMOTE);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 119");
- se = st.getEndingState("unlocked", "enabled", "dependency,failed", "hotstandby", "promote");
- assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 122");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY_FAILED, PROVIDINGSERVICE, UNLOCK);
+ assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 120");
- se = st.getEndingState("unlocked", "enabled", "dependency,failed", "hotstandby", "demote");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 123");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY_FAILED, PROVIDINGSERVICE, DISABLE_FAILED);
+ assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 121");
- se = st.getEndingState("unlocked", "enabled", "dependency,failed", "providingservice", "demote");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 124");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY_FAILED, PROVIDINGSERVICE,
+ ENABLE_NOT_FAILED);
+ assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
+
+ logger.info("??? StateTransition testcase 125");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY_FAILED, PROVIDINGSERVICE,
+ DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
+
+ logger.info("??? StateTransition testcase 126");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY_FAILED, PROVIDINGSERVICE,
+ ENABLE_NO_DEPENDENCY);
+ assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 122");
- se = st.getEndingState("unlocked", "enabled", "dependency,failed", "providingservice", "unlock");
- assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 127");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY_FAILED, PROVIDINGSERVICE, PROMOTE);
+ assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 123");
- se = st.getEndingState("unlocked", "enabled", "dependency,failed", "providingservice", "disableFailed");
- assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 128");
+ se = st.getEndingState(UNLOCKED, ENABLED, DEPENDENCY_FAILED, PROVIDINGSERVICE, DEMOTE);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 124");
- se = st.getEndingState("unlocked", "enabled", "dependency,failed", "providingservice",
- "enableNotFailed");
- assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
-
- logger.info("??? StateTransition testcase 125");
- se = st.getEndingState("unlocked", "enabled", "dependency,failed", "providingservice",
- "disableDependency");
- assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
-
- logger.info("??? StateTransition testcase 126");
- se = st.getEndingState("unlocked", "enabled", "dependency,failed", "providingservice",
- "enableNoDependency");
- assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 129");
+ se = st.getEndingState(UNLOCKED, DISABLED, "null", "null", DEMOTE);
+ assertEquals("coldstandby,unlocked,disabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 127");
- se = st.getEndingState("unlocked", "enabled", "dependency,failed", "providingservice", "promote");
- assertEquals("providingservice,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 130");
+ se = st.getEndingState(UNLOCKED, DISABLED, "null", "null", UNLOCK);
+ assertEquals("null,unlocked,disabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 128");
- se = st.getEndingState("unlocked", "enabled", "dependency,failed", "providingservice", "demote");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 131");
+ se = st.getEndingState(UNLOCKED, DISABLED, "null", "null", DISABLE_FAILED);
+ assertEquals("null,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 129");
- se = st.getEndingState("unlocked", "disabled", "null", "null", "demote");
- assertEquals("coldstandby,unlocked,disabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 132");
+ se = st.getEndingState(UNLOCKED, DISABLED, "null", "null", ENABLE_NOT_FAILED);
+ assertEquals("null,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 130");
- se = st.getEndingState("unlocked", "disabled", "null", "null", "unlock");
- assertEquals("null,unlocked,disabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 133");
+ se = st.getEndingState(UNLOCKED, DISABLED, "null", "null", DISABLE_DEPENDENCY);
+ assertEquals("null,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 131");
- se = st.getEndingState("unlocked", "disabled", "null", "null", "disableFailed");
- assertEquals("null,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 134");
+ se = st.getEndingState(UNLOCKED, DISABLED, "null", "null", ENABLE_NO_DEPENDENCY);
+ assertEquals("null,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 132");
- se = st.getEndingState("unlocked", "disabled", "null", "null", "enableNotFailed");
- assertEquals("null,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 135");
+ se = st.getEndingState(UNLOCKED, DISABLED, "null", "null", PROMOTE);
+ assertEquals("coldstandby,unlocked,disabled,null,StandbyStatusException", makeString(se));
- logger.info("??? StateTransition testcase 133");
- se = st.getEndingState("unlocked", "disabled", "null", "null", "disableDependency");
- assertEquals("null,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 136");
+ se = st.getEndingState(UNLOCKED, DISABLED, "null", "null", DEMOTE);
+ assertEquals("coldstandby,unlocked,disabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 134");
- se = st.getEndingState("unlocked", "disabled", "null", "null", "enableNoDependency");
- assertEquals("null,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 137");
+ se = st.getEndingState(UNLOCKED, DISABLED, "null", COLDSTANDBY, DEMOTE);
+ assertEquals("coldstandby,unlocked,disabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 135");
- se = st.getEndingState("unlocked", "disabled", "null", "null", "promote");
- assertEquals("coldstandby,unlocked,disabled,null,StandbyStatusException", makeString(se));
+ logger.info("??? StateTransition testcase 138");
+ se = st.getEndingState(UNLOCKED, DISABLED, "null", COLDSTANDBY, UNLOCK);
+ assertEquals("coldstandby,unlocked,disabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 136");
- se = st.getEndingState("unlocked", "disabled", "null", "null", "demote");
- assertEquals("coldstandby,unlocked,disabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 139");
+ se = st.getEndingState(UNLOCKED, DISABLED, "null", COLDSTANDBY, DISABLE_FAILED);
+ assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 137");
- se = st.getEndingState("unlocked", "disabled", "null", "coldstandby", "demote");
- assertEquals("coldstandby,unlocked,disabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 140");
+ se = st.getEndingState(UNLOCKED, DISABLED, "null", COLDSTANDBY, ENABLE_NOT_FAILED);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 138");
- se = st.getEndingState("unlocked", "disabled", "null", "coldstandby", "unlock");
- assertEquals("coldstandby,unlocked,disabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 141");
+ se = st.getEndingState(UNLOCKED, DISABLED, "null", COLDSTANDBY, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 139");
- se = st.getEndingState("unlocked", "disabled", "null", "coldstandby", "disableFailed");
- assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 142");
+ se = st.getEndingState(UNLOCKED, DISABLED, "null", COLDSTANDBY, ENABLE_NO_DEPENDENCY);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 140");
- se = st.getEndingState("unlocked", "disabled", "null", "coldstandby", "enableNotFailed");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 143");
+ se = st.getEndingState(UNLOCKED, DISABLED, "null", COLDSTANDBY, PROMOTE);
+ assertEquals("coldstandby,unlocked,disabled,null,StandbyStatusException", makeString(se));
- logger.info("??? StateTransition testcase 141");
- se = st.getEndingState("unlocked", "disabled", "null", "coldstandby", "disableDependency");
- assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 144");
+ se = st.getEndingState(UNLOCKED, DISABLED, "null", COLDSTANDBY, DEMOTE);
+ assertEquals("coldstandby,unlocked,disabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 142");
- se = st.getEndingState("unlocked", "disabled", "null", "coldstandby", "enableNoDependency");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 145");
+ se = st.getEndingState(UNLOCKED, DISABLED, "null", HOTSTANDBY, DEMOTE);
+ assertEquals("coldstandby,unlocked,disabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 143");
- se = st.getEndingState("unlocked", "disabled", "null", "coldstandby", "promote");
- assertEquals("coldstandby,unlocked,disabled,null,StandbyStatusException", makeString(se));
+ logger.info("??? StateTransition testcase 146");
+ se = st.getEndingState(UNLOCKED, DISABLED, "null", HOTSTANDBY, UNLOCK);
+ assertEquals("coldstandby,unlocked,disabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 144");
- se = st.getEndingState("unlocked", "disabled", "null", "coldstandby", "demote");
- assertEquals("coldstandby,unlocked,disabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 147");
+ se = st.getEndingState(UNLOCKED, DISABLED, "null", HOTSTANDBY, DISABLE_FAILED);
+ assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 145");
- se = st.getEndingState("unlocked", "disabled", "null", "hotstandby", "demote");
- assertEquals("coldstandby,unlocked,disabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 148");
+ se = st.getEndingState(UNLOCKED, DISABLED, "null", HOTSTANDBY, ENABLE_NOT_FAILED);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 146");
- se = st.getEndingState("unlocked", "disabled", "null", "hotstandby", "unlock");
- assertEquals("coldstandby,unlocked,disabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 149");
+ se = st.getEndingState(UNLOCKED, DISABLED, "null", HOTSTANDBY, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 147");
- se = st.getEndingState("unlocked", "disabled", "null", "hotstandby", "disableFailed");
- assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 150");
+ se = st.getEndingState(UNLOCKED, DISABLED, "null", HOTSTANDBY, ENABLE_NO_DEPENDENCY);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 148");
- se = st.getEndingState("unlocked", "disabled", "null", "hotstandby", "enableNotFailed");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 151");
+ se = st.getEndingState(UNLOCKED, DISABLED, "null", HOTSTANDBY, PROMOTE);
+ assertEquals("coldstandby,unlocked,disabled,null,StandbyStatusException", makeString(se));
- logger.info("??? StateTransition testcase 149");
- se = st.getEndingState("unlocked", "disabled", "null", "hotstandby", "disableDependency");
- assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 152");
+ se = st.getEndingState(UNLOCKED, DISABLED, "null", HOTSTANDBY, DEMOTE);
+ assertEquals("coldstandby,unlocked,disabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 150");
- se = st.getEndingState("unlocked", "disabled", "null", "hotstandby", "enableNoDependency");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 153");
+ se = st.getEndingState(UNLOCKED, DISABLED, "null", PROVIDINGSERVICE, DEMOTE);
+ assertEquals("coldstandby,unlocked,disabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 151");
- se = st.getEndingState("unlocked", "disabled", "null", "hotstandby", "promote");
- assertEquals("coldstandby,unlocked,disabled,null,StandbyStatusException", makeString(se));
+ logger.info("??? StateTransition testcase 154");
+ se = st.getEndingState(UNLOCKED, DISABLED, "null", PROVIDINGSERVICE, UNLOCK);
+ assertEquals("coldstandby,unlocked,disabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 152");
- se = st.getEndingState("unlocked", "disabled", "null", "hotstandby", "demote");
- assertEquals("coldstandby,unlocked,disabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 155");
+ se = st.getEndingState(UNLOCKED, DISABLED, "null", PROVIDINGSERVICE, DISABLE_FAILED);
+ assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 153");
- se = st.getEndingState("unlocked", "disabled", "null", "providingservice", "demote");
- assertEquals("coldstandby,unlocked,disabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 156");
+ se = st.getEndingState(UNLOCKED, DISABLED, "null", PROVIDINGSERVICE, ENABLE_NOT_FAILED);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 154");
- se = st.getEndingState("unlocked", "disabled", "null", "providingservice", "unlock");
- assertEquals("coldstandby,unlocked,disabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 157");
+ se = st.getEndingState(UNLOCKED, DISABLED, "null", PROVIDINGSERVICE, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 155");
- se = st.getEndingState("unlocked", "disabled", "null", "providingservice", "disableFailed");
- assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 158");
+ se = st.getEndingState(UNLOCKED, DISABLED, "null", PROVIDINGSERVICE, ENABLE_NO_DEPENDENCY);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 156");
- se = st.getEndingState("unlocked", "disabled", "null", "providingservice", "enableNotFailed");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 159");
+ se = st.getEndingState(UNLOCKED, DISABLED, "null", PROVIDINGSERVICE, PROMOTE);
+ assertEquals("coldstandby,unlocked,disabled,null,StandbyStatusException", makeString(se));
- logger.info("??? StateTransition testcase 157");
- se = st.getEndingState("unlocked", "disabled", "null", "providingservice", "disableDependency");
- assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 160");
+ se = st.getEndingState(UNLOCKED, DISABLED, "null", PROVIDINGSERVICE, DEMOTE);
+ assertEquals("coldstandby,unlocked,disabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 158");
- se = st.getEndingState("unlocked", "disabled", "null", "providingservice", "enableNoDependency");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 161");
+ se = st.getEndingState(UNLOCKED, DISABLED, FAILED, "null", DEMOTE);
+ assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 159");
- se = st.getEndingState("unlocked", "disabled", "null", "providingservice", "promote");
- assertEquals("coldstandby,unlocked,disabled,null,StandbyStatusException", makeString(se));
+ logger.info("??? StateTransition testcase 162");
+ se = st.getEndingState(UNLOCKED, DISABLED, FAILED, "null", UNLOCK);
+ assertEquals("null,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 160");
- se = st.getEndingState("unlocked", "disabled", "null", "providingservice", "demote");
- assertEquals("coldstandby,unlocked,disabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 163");
+ se = st.getEndingState(UNLOCKED, DISABLED, FAILED, "null", DISABLE_FAILED);
+ assertEquals("null,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 161");
- se = st.getEndingState("unlocked", "disabled", "failed", "null", "demote");
- assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 164");
+ se = st.getEndingState(UNLOCKED, DISABLED, FAILED, "null", ENABLE_NOT_FAILED);
+ assertEquals("null,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 162");
- se = st.getEndingState("unlocked", "disabled", "failed", "null", "unlock");
- assertEquals("null,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 165");
+ se = st.getEndingState(UNLOCKED, DISABLED, FAILED, "null", DISABLE_DEPENDENCY);
+ assertEquals("null,unlocked,disabled,dependency,failed,", makeString(se));
- logger.info("??? StateTransition testcase 163");
- se = st.getEndingState("unlocked", "disabled", "failed", "null", "disableFailed");
- assertEquals("null,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 166");
+ se = st.getEndingState(UNLOCKED, DISABLED, FAILED, "null", ENABLE_NO_DEPENDENCY);
+ assertEquals("null,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 164");
- se = st.getEndingState("unlocked", "disabled", "failed", "null", "enableNotFailed");
- assertEquals("null,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 167");
+ se = st.getEndingState(UNLOCKED, DISABLED, FAILED, "null", PROMOTE);
+ assertEquals("coldstandby,unlocked,disabled,failed,StandbyStatusException", makeString(se));
- logger.info("??? StateTransition testcase 165");
- se = st.getEndingState("unlocked", "disabled", "failed", "null", "disableDependency");
- assertEquals("null,unlocked,disabled,dependency,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 168");
+ se = st.getEndingState(UNLOCKED, DISABLED, FAILED, "null", DEMOTE);
+ assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 166");
- se = st.getEndingState("unlocked", "disabled", "failed", "null", "enableNoDependency");
- assertEquals("null,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 169");
+ se = st.getEndingState(UNLOCKED, DISABLED, FAILED, COLDSTANDBY, DEMOTE);
+ assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 167");
- se = st.getEndingState("unlocked", "disabled", "failed", "null", "promote");
- assertEquals("coldstandby,unlocked,disabled,failed,StandbyStatusException", makeString(se));
+ logger.info("??? StateTransition testcase 170");
+ se = st.getEndingState(UNLOCKED, DISABLED, FAILED, COLDSTANDBY, UNLOCK);
+ assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 168");
- se = st.getEndingState("unlocked", "disabled", "failed", "null", "demote");
- assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 171");
+ se = st.getEndingState(UNLOCKED, DISABLED, FAILED, COLDSTANDBY, DISABLE_FAILED);
+ assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 169");
- se = st.getEndingState("unlocked", "disabled", "failed", "coldstandby", "demote");
- assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 172");
+ se = st.getEndingState(UNLOCKED, DISABLED, FAILED, COLDSTANDBY, ENABLE_NOT_FAILED);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 170");
- se = st.getEndingState("unlocked", "disabled", "failed", "coldstandby", "unlock");
- assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 173");
+ se = st.getEndingState(UNLOCKED, DISABLED, FAILED, COLDSTANDBY, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
- logger.info("??? StateTransition testcase 171");
- se = st.getEndingState("unlocked", "disabled", "failed", "coldstandby", "disableFailed");
- assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 174");
+ se = st.getEndingState(UNLOCKED, DISABLED, FAILED, COLDSTANDBY, ENABLE_NO_DEPENDENCY);
+ assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 172");
- se = st.getEndingState("unlocked", "disabled", "failed", "coldstandby", "enableNotFailed");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 175");
+ se = st.getEndingState(UNLOCKED, DISABLED, FAILED, COLDSTANDBY, PROMOTE);
+ assertEquals("coldstandby,unlocked,disabled,failed,StandbyStatusException", makeString(se));
- logger.info("??? StateTransition testcase 173");
- se = st.getEndingState("unlocked", "disabled", "failed", "coldstandby", "disableDependency");
- assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 176");
+ se = st.getEndingState(UNLOCKED, DISABLED, FAILED, COLDSTANDBY, DEMOTE);
+ assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 174");
- se = st.getEndingState("unlocked", "disabled", "failed", "coldstandby", "enableNoDependency");
- assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 177");
+ se = st.getEndingState(UNLOCKED, DISABLED, FAILED, HOTSTANDBY, DEMOTE);
+ assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 175");
- se = st.getEndingState("unlocked", "disabled", "failed", "coldstandby", "promote");
- assertEquals("coldstandby,unlocked,disabled,failed,StandbyStatusException", makeString(se));
+ logger.info("??? StateTransition testcase 178");
+ se = st.getEndingState(UNLOCKED, DISABLED, FAILED, HOTSTANDBY, UNLOCK);
+ assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 176");
- se = st.getEndingState("unlocked", "disabled", "failed", "coldstandby", "demote");
- assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 179");
+ se = st.getEndingState(UNLOCKED, DISABLED, FAILED, HOTSTANDBY, DISABLE_FAILED);
+ assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 177");
- se = st.getEndingState("unlocked", "disabled", "failed", "hotstandby", "demote");
- assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 180");
+ se = st.getEndingState(UNLOCKED, DISABLED, FAILED, HOTSTANDBY, ENABLE_NOT_FAILED);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 178");
- se = st.getEndingState("unlocked", "disabled", "failed", "hotstandby", "unlock");
- assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 181");
+ se = st.getEndingState(UNLOCKED, DISABLED, FAILED, HOTSTANDBY, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
- logger.info("??? StateTransition testcase 179");
- se = st.getEndingState("unlocked", "disabled", "failed", "hotstandby", "disableFailed");
- assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 182");
+ se = st.getEndingState(UNLOCKED, DISABLED, FAILED, HOTSTANDBY, ENABLE_NO_DEPENDENCY);
+ assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 180");
- se = st.getEndingState("unlocked", "disabled", "failed", "hotstandby", "enableNotFailed");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 183");
+ se = st.getEndingState(UNLOCKED, DISABLED, FAILED, HOTSTANDBY, PROMOTE);
+ assertEquals("coldstandby,unlocked,disabled,failed,StandbyStatusException", makeString(se));
- logger.info("??? StateTransition testcase 181");
- se = st.getEndingState("unlocked", "disabled", "failed", "hotstandby", "disableDependency");
- assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 184");
+ se = st.getEndingState(UNLOCKED, DISABLED, FAILED, HOTSTANDBY, DEMOTE);
+ assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 182");
- se = st.getEndingState("unlocked", "disabled", "failed", "hotstandby", "enableNoDependency");
- assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 185");
+ se = st.getEndingState(UNLOCKED, DISABLED, FAILED, PROVIDINGSERVICE, DEMOTE);
+ assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 183");
- se = st.getEndingState("unlocked", "disabled", "failed", "hotstandby", "promote");
- assertEquals("coldstandby,unlocked,disabled,failed,StandbyStatusException", makeString(se));
+ logger.info("??? StateTransition testcase 186");
+ se = st.getEndingState(UNLOCKED, DISABLED, FAILED, PROVIDINGSERVICE, UNLOCK);
+ assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 184");
- se = st.getEndingState("unlocked", "disabled", "failed", "hotstandby", "demote");
- assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 187");
+ se = st.getEndingState(UNLOCKED, DISABLED, FAILED, PROVIDINGSERVICE, DISABLE_FAILED);
+ assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 185");
- se = st.getEndingState("unlocked", "disabled", "failed", "providingservice", "demote");
- assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 188");
+ se = st.getEndingState(UNLOCKED, DISABLED, FAILED, PROVIDINGSERVICE, ENABLE_NOT_FAILED);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 186");
- se = st.getEndingState("unlocked", "disabled", "failed", "providingservice", "unlock");
- assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 189");
+ se = st.getEndingState(UNLOCKED, DISABLED, FAILED, PROVIDINGSERVICE, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
- logger.info("??? StateTransition testcase 187");
- se = st.getEndingState("unlocked", "disabled", "failed", "providingservice", "disableFailed");
- assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 190");
+ se = st.getEndingState(UNLOCKED, DISABLED, FAILED, PROVIDINGSERVICE, ENABLE_NO_DEPENDENCY);
+ assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 188");
- se = st.getEndingState("unlocked", "disabled", "failed", "providingservice", "enableNotFailed");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 191");
+ se = st.getEndingState(UNLOCKED, DISABLED, FAILED, PROVIDINGSERVICE, PROMOTE);
+ assertEquals("coldstandby,unlocked,disabled,failed,StandbyStatusException", makeString(se));
- logger.info("??? StateTransition testcase 189");
- se = st.getEndingState("unlocked", "disabled", "failed", "providingservice", "disableDependency");
- assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 192");
+ se = st.getEndingState(UNLOCKED, DISABLED, FAILED, PROVIDINGSERVICE, DEMOTE);
+ assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 190");
- se = st.getEndingState("unlocked", "disabled", "failed", "providingservice", "enableNoDependency");
- assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 193");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY, "null", DEMOTE);
+ assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 191");
- se = st.getEndingState("unlocked", "disabled", "failed", "providingservice", "promote");
- assertEquals("coldstandby,unlocked,disabled,failed,StandbyStatusException", makeString(se));
+ logger.info("??? StateTransition testcase 194");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY, "null", UNLOCK);
+ assertEquals("null,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 192");
- se = st.getEndingState("unlocked", "disabled", "failed", "providingservice", "demote");
- assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 195");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY, "null", DISABLE_FAILED);
+ assertEquals("null,unlocked,disabled,dependency,failed,", makeString(se));
- logger.info("??? StateTransition testcase 193");
- se = st.getEndingState("unlocked", "disabled", "dependency", "null", "demote");
- assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 196");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY, "null", ENABLE_NOT_FAILED);
+ assertEquals("null,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 194");
- se = st.getEndingState("unlocked", "disabled", "dependency", "null", "unlock");
- assertEquals("null,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 197");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY, "null", DISABLE_DEPENDENCY);
+ assertEquals("null,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 195");
- se = st.getEndingState("unlocked", "disabled", "dependency", "null", "disableFailed");
- assertEquals("null,unlocked,disabled,dependency,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 198");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY, "null", ENABLE_NO_DEPENDENCY);
+ assertEquals("null,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 196");
- se = st.getEndingState("unlocked", "disabled", "dependency", "null", "enableNotFailed");
- assertEquals("null,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 199");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY, "null", PROMOTE);
+ assertEquals("coldstandby,unlocked,disabled,dependency,StandbyStatusException", makeString(se));
- logger.info("??? StateTransition testcase 197");
- se = st.getEndingState("unlocked", "disabled", "dependency", "null", "disableDependency");
- assertEquals("null,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 200");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY, "null", DEMOTE);
+ assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 198");
- se = st.getEndingState("unlocked", "disabled", "dependency", "null", "enableNoDependency");
- assertEquals("null,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 201");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY, COLDSTANDBY, DEMOTE);
+ assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 199");
- se = st.getEndingState("unlocked", "disabled", "dependency", "null", "promote");
- assertEquals("coldstandby,unlocked,disabled,dependency,StandbyStatusException", makeString(se));
+ logger.info("??? StateTransition testcase 202");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY, COLDSTANDBY, UNLOCK);
+ assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 200");
- se = st.getEndingState("unlocked", "disabled", "dependency", "null", "demote");
- assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 203");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY, COLDSTANDBY, DISABLE_FAILED);
+ assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
- logger.info("??? StateTransition testcase 201");
- se = st.getEndingState("unlocked", "disabled", "dependency", "coldstandby", "demote");
- assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 204");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY, COLDSTANDBY, ENABLE_NOT_FAILED);
+ assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 202");
- se = st.getEndingState("unlocked", "disabled", "dependency", "coldstandby", "unlock");
- assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 205");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY, COLDSTANDBY, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 203");
- se = st.getEndingState("unlocked", "disabled", "dependency", "coldstandby", "disableFailed");
- assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 206");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY, COLDSTANDBY, ENABLE_NO_DEPENDENCY);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 204");
- se = st.getEndingState("unlocked", "disabled", "dependency", "coldstandby", "enableNotFailed");
- assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 207");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY, COLDSTANDBY, PROMOTE);
+ assertEquals("coldstandby,unlocked,disabled,dependency,StandbyStatusException", makeString(se));
- logger.info("??? StateTransition testcase 205");
- se = st.getEndingState("unlocked", "disabled", "dependency", "coldstandby", "disableDependency");
- assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 208");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY, COLDSTANDBY, DEMOTE);
+ assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 206");
- se = st.getEndingState("unlocked", "disabled", "dependency", "coldstandby", "enableNoDependency");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 209");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY, HOTSTANDBY, DEMOTE);
+ assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 207");
- se = st.getEndingState("unlocked", "disabled", "dependency", "coldstandby", "promote");
- assertEquals("coldstandby,unlocked,disabled,dependency,StandbyStatusException", makeString(se));
+ logger.info("??? StateTransition testcase 210");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY, HOTSTANDBY, UNLOCK);
+ assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 208");
- se = st.getEndingState("unlocked", "disabled", "dependency", "coldstandby", "demote");
- assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 211");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY, HOTSTANDBY, DISABLE_FAILED);
+ assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
- logger.info("??? StateTransition testcase 209");
- se = st.getEndingState("unlocked", "disabled", "dependency", "hotstandby", "demote");
- assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 212");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY, HOTSTANDBY, ENABLE_NOT_FAILED);
+ assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 210");
- se = st.getEndingState("unlocked", "disabled", "dependency", "hotstandby", "unlock");
- assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 213");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY, HOTSTANDBY, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 211");
- se = st.getEndingState("unlocked", "disabled", "dependency", "hotstandby", "disableFailed");
- assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 214");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY, HOTSTANDBY, ENABLE_NO_DEPENDENCY);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 212");
- se = st.getEndingState("unlocked", "disabled", "dependency", "hotstandby", "enableNotFailed");
- assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 215");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY, HOTSTANDBY, PROMOTE);
+ assertEquals("coldstandby,unlocked,disabled,dependency,StandbyStatusException", makeString(se));
- logger.info("??? StateTransition testcase 213");
- se = st.getEndingState("unlocked", "disabled", "dependency", "hotstandby", "disableDependency");
- assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 216");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY, HOTSTANDBY, DEMOTE);
+ assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 214");
- se = st.getEndingState("unlocked", "disabled", "dependency", "hotstandby", "enableNoDependency");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 217");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY, PROVIDINGSERVICE, DEMOTE);
+ assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 215");
- se = st.getEndingState("unlocked", "disabled", "dependency", "hotstandby", "promote");
- assertEquals("coldstandby,unlocked,disabled,dependency,StandbyStatusException", makeString(se));
+ logger.info("??? StateTransition testcase 218");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY, PROVIDINGSERVICE, UNLOCK);
+ assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 216");
- se = st.getEndingState("unlocked", "disabled", "dependency", "hotstandby", "demote");
- assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 219");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY, PROVIDINGSERVICE, DISABLE_FAILED);
+ assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
- logger.info("??? StateTransition testcase 217");
- se = st.getEndingState("unlocked", "disabled", "dependency", "providingservice", "demote");
- assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 220");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY, PROVIDINGSERVICE, ENABLE_NOT_FAILED);
+ assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 218");
- se = st.getEndingState("unlocked", "disabled", "dependency", "providingservice", "unlock");
- assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 221");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY, PROVIDINGSERVICE, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 219");
- se = st.getEndingState("unlocked", "disabled", "dependency", "providingservice", "disableFailed");
- assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 222");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY, PROVIDINGSERVICE, ENABLE_NO_DEPENDENCY);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 220");
- se = st.getEndingState("unlocked", "disabled", "dependency", "providingservice", "enableNotFailed");
- assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 223");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY, PROVIDINGSERVICE, PROMOTE);
+ assertEquals("coldstandby,unlocked,disabled,dependency,StandbyStatusException", makeString(se));
- logger.info("??? StateTransition testcase 221");
- se = st.getEndingState("unlocked", "disabled", "dependency", "providingservice", "disableDependency");
- assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 224");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY, PROVIDINGSERVICE, DEMOTE);
+ assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 222");
- se = st.getEndingState("unlocked", "disabled", "dependency", "providingservice", "enableNoDependency");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 225");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY_FAILED, "null", DEMOTE);
+ assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
- logger.info("??? StateTransition testcase 223");
- se = st.getEndingState("unlocked", "disabled", "dependency", "providingservice", "promote");
- assertEquals("coldstandby,unlocked,disabled,dependency,StandbyStatusException", makeString(se));
+ logger.info("??? StateTransition testcase 226");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY_FAILED, "null", UNLOCK);
+ assertEquals("null,unlocked,disabled,dependency,failed,", makeString(se));
- logger.info("??? StateTransition testcase 224");
- se = st.getEndingState("unlocked", "disabled", "dependency", "providingservice", "demote");
- assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 227");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY_FAILED, "null", DISABLE_FAILED);
+ assertEquals("null,unlocked,disabled,dependency,failed,", makeString(se));
- logger.info("??? StateTransition testcase 225");
- se = st.getEndingState("unlocked", "disabled", "dependency,failed", "null", "demote");
- assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 228");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY_FAILED, "null", ENABLE_NOT_FAILED);
+ assertEquals("null,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 226");
- se = st.getEndingState("unlocked", "disabled", "dependency,failed", "null", "unlock");
- assertEquals("null,unlocked,disabled,dependency,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 229");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY_FAILED, "null", DISABLE_DEPENDENCY);
+ assertEquals("null,unlocked,disabled,dependency,failed,", makeString(se));
- logger.info("??? StateTransition testcase 227");
- se = st.getEndingState("unlocked", "disabled", "dependency,failed", "null", "disableFailed");
- assertEquals("null,unlocked,disabled,dependency,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 230");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY_FAILED, "null", ENABLE_NO_DEPENDENCY);
+ assertEquals("null,unlocked,disabled,failed,", makeString(se));
+
+ logger.info("??? StateTransition testcase 231");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY_FAILED, "null", PROMOTE);
+ assertEquals("coldstandby,unlocked,disabled,dependency,failed,StandbyStatusException", makeString(se));
+
+ logger.info("??? StateTransition testcase 232");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY_FAILED, "null", DEMOTE);
+ assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
+
+ logger.info("??? StateTransition testcase 233");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY_FAILED, COLDSTANDBY, DEMOTE);
+ assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
+
+ logger.info("??? StateTransition testcase 234");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY_FAILED, COLDSTANDBY, UNLOCK);
+ assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
+
+ logger.info("??? StateTransition testcase 235");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY_FAILED, COLDSTANDBY, DISABLE_FAILED);
+ assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
+
+ logger.info("??? StateTransition testcase 236");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY_FAILED, COLDSTANDBY, ENABLE_NOT_FAILED);
+ assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
+
+ logger.info("??? StateTransition testcase 237");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY_FAILED, COLDSTANDBY, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
+
+ logger.info("??? StateTransition testcase 238");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY_FAILED, COLDSTANDBY,
+ ENABLE_NO_DEPENDENCY);
+ assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
+
+ logger.info("??? StateTransition testcase 239");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY_FAILED, COLDSTANDBY, PROMOTE);
+ assertEquals("coldstandby,unlocked,disabled,dependency,failed,StandbyStatusException", makeString(se));
+
+ logger.info("??? StateTransition testcase 240");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY_FAILED, COLDSTANDBY, DEMOTE);
+ assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
+
+ logger.info("??? StateTransition testcase 241");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY_FAILED, HOTSTANDBY, DEMOTE);
+ assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
+
+ logger.info("??? StateTransition testcase 242");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY_FAILED, HOTSTANDBY, UNLOCK);
+ assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
+
+ logger.info("??? StateTransition testcase 243");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY_FAILED, HOTSTANDBY, DISABLE_FAILED);
+ assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
+
+ logger.info("??? StateTransition testcase 244");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY_FAILED, HOTSTANDBY, ENABLE_NOT_FAILED);
+ assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
+
+ logger.info("??? StateTransition testcase 245");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY_FAILED, HOTSTANDBY, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
+
+ logger.info("??? StateTransition testcase 246");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY_FAILED, HOTSTANDBY, ENABLE_NO_DEPENDENCY);
+ assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
+
+ logger.info("??? StateTransition testcase 247");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY_FAILED, HOTSTANDBY, PROMOTE);
+ assertEquals("coldstandby,unlocked,disabled,dependency,failed,StandbyStatusException", makeString(se));
+
+ logger.info("??? StateTransition testcase 248");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY_FAILED, HOTSTANDBY, DEMOTE);
+ assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
+
+ logger.info("??? StateTransition testcase 249");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY_FAILED, PROVIDINGSERVICE, DEMOTE);
+ assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
+
+ logger.info("??? StateTransition testcase 250");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY_FAILED, PROVIDINGSERVICE, UNLOCK);
+ assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
+
+ logger.info("??? StateTransition testcase 251");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY_FAILED, PROVIDINGSERVICE,
+ DISABLE_FAILED);
+ assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
+
+ logger.info("??? StateTransition testcase 252");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY_FAILED, PROVIDINGSERVICE,
+ ENABLE_NOT_FAILED);
+ assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
+
+ logger.info("??? StateTransition testcase 253");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY_FAILED, PROVIDINGSERVICE,
+ DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
+
+ logger.info("??? StateTransition testcase 254");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY_FAILED, PROVIDINGSERVICE,
+ ENABLE_NO_DEPENDENCY);
+ assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
+
+ logger.info("??? StateTransition testcase 255");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY_FAILED, PROVIDINGSERVICE, PROMOTE);
+ assertEquals("coldstandby,unlocked,disabled,dependency,failed,StandbyStatusException", makeString(se));
+
+ logger.info("??? StateTransition testcase 256");
+ se = st.getEndingState(UNLOCKED, DISABLED, DEPENDENCY_FAILED, PROVIDINGSERVICE, DEMOTE);
+ assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
+
+ logger.info("??? StateTransition testcase 257");
+ se = st.getEndingState(LOCKED, ENABLED, "null", "null", DEMOTE);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+
+ logger.info("??? StateTransition testcase 258");
+ se = st.getEndingState(LOCKED, ENABLED, "null", "null", UNLOCK);
+ assertEquals("null,unlocked,enabled,null,", makeString(se));
+
+ logger.info("??? StateTransition testcase 259");
+ se = st.getEndingState(LOCKED, ENABLED, "null", "null", DISABLE_FAILED);
+ assertEquals("null,locked,disabled,failed,", makeString(se));
+
+ logger.info("??? StateTransition testcase 260");
+ se = st.getEndingState(LOCKED, ENABLED, "null", "null", ENABLE_NOT_FAILED);
+ assertEquals("null,locked,enabled,null,", makeString(se));
+
+ logger.info("??? StateTransition testcase 261");
+ se = st.getEndingState(LOCKED, ENABLED, "null", "null", DISABLE_DEPENDENCY);
+ assertEquals("null,locked,disabled,dependency,", makeString(se));
+
+ logger.info("??? StateTransition testcase 262");
+ se = st.getEndingState(LOCKED, ENABLED, "null", "null", ENABLE_NO_DEPENDENCY);
+ assertEquals("null,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 228");
- se = st.getEndingState("unlocked", "disabled", "dependency,failed", "null", "enableNotFailed");
- assertEquals("null,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 263");
+ se = st.getEndingState(LOCKED, ENABLED, "null", "null", PROMOTE);
+ assertEquals("coldstandby,locked,enabled,null,StandbyStatusException", makeString(se));
- logger.info("??? StateTransition testcase 229");
- se = st.getEndingState("unlocked", "disabled", "dependency,failed", "null", "disableDependency");
- assertEquals("null,unlocked,disabled,dependency,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 264");
+ se = st.getEndingState(LOCKED, ENABLED, "null", "null", DEMOTE);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 230");
- se = st.getEndingState("unlocked", "disabled", "dependency,failed", "null", "enableNoDependency");
- assertEquals("null,unlocked,disabled,failed,", makeString(se));
-
- logger.info("??? StateTransition testcase 231");
- se = st.getEndingState("unlocked", "disabled", "dependency,failed", "null", "promote");
- assertEquals("coldstandby,unlocked,disabled,dependency,failed,StandbyStatusException", makeString(se));
-
- logger.info("??? StateTransition testcase 232");
- se = st.getEndingState("unlocked", "disabled", "dependency,failed", "null", "demote");
- assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
-
- logger.info("??? StateTransition testcase 233");
- se = st.getEndingState("unlocked", "disabled", "dependency,failed", "coldstandby", "demote");
- assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
-
- logger.info("??? StateTransition testcase 234");
- se = st.getEndingState("unlocked", "disabled", "dependency,failed", "coldstandby", "unlock");
- assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
-
- logger.info("??? StateTransition testcase 235");
- se = st.getEndingState("unlocked", "disabled", "dependency,failed", "coldstandby", "disableFailed");
- assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
-
- logger.info("??? StateTransition testcase 236");
- se = st.getEndingState("unlocked", "disabled", "dependency,failed", "coldstandby", "enableNotFailed");
- assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
-
- logger.info("??? StateTransition testcase 237");
- se = st.getEndingState("unlocked", "disabled", "dependency,failed", "coldstandby", "disableDependency");
- assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
-
- logger.info("??? StateTransition testcase 238");
- se = st.getEndingState("unlocked", "disabled", "dependency,failed", "coldstandby",
- "enableNoDependency");
- assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
-
- logger.info("??? StateTransition testcase 239");
- se = st.getEndingState("unlocked", "disabled", "dependency,failed", "coldstandby", "promote");
- assertEquals("coldstandby,unlocked,disabled,dependency,failed,StandbyStatusException", makeString(se));
-
- logger.info("??? StateTransition testcase 240");
- se = st.getEndingState("unlocked", "disabled", "dependency,failed", "coldstandby", "demote");
- assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
-
- logger.info("??? StateTransition testcase 241");
- se = st.getEndingState("unlocked", "disabled", "dependency,failed", "hotstandby", "demote");
- assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
-
- logger.info("??? StateTransition testcase 242");
- se = st.getEndingState("unlocked", "disabled", "dependency,failed", "hotstandby", "unlock");
- assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
-
- logger.info("??? StateTransition testcase 243");
- se = st.getEndingState("unlocked", "disabled", "dependency,failed", "hotstandby", "disableFailed");
- assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
-
- logger.info("??? StateTransition testcase 244");
- se = st.getEndingState("unlocked", "disabled", "dependency,failed", "hotstandby", "enableNotFailed");
- assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
-
- logger.info("??? StateTransition testcase 245");
- se = st.getEndingState("unlocked", "disabled", "dependency,failed", "hotstandby", "disableDependency");
- assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
-
- logger.info("??? StateTransition testcase 246");
- se = st.getEndingState("unlocked", "disabled", "dependency,failed", "hotstandby", "enableNoDependency");
- assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
-
- logger.info("??? StateTransition testcase 247");
- se = st.getEndingState("unlocked", "disabled", "dependency,failed", "hotstandby", "promote");
- assertEquals("coldstandby,unlocked,disabled,dependency,failed,StandbyStatusException", makeString(se));
-
- logger.info("??? StateTransition testcase 248");
- se = st.getEndingState("unlocked", "disabled", "dependency,failed", "hotstandby", "demote");
- assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
-
- logger.info("??? StateTransition testcase 249");
- se = st.getEndingState("unlocked", "disabled", "dependency,failed", "providingservice", "demote");
- assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
-
- logger.info("??? StateTransition testcase 250");
- se = st.getEndingState("unlocked", "disabled", "dependency,failed", "providingservice", "unlock");
- assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
-
- logger.info("??? StateTransition testcase 251");
- se = st.getEndingState("unlocked", "disabled", "dependency,failed", "providingservice",
- "disableFailed");
- assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
-
- logger.info("??? StateTransition testcase 252");
- se = st.getEndingState("unlocked", "disabled", "dependency,failed", "providingservice",
- "enableNotFailed");
- assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
-
- logger.info("??? StateTransition testcase 253");
- se = st.getEndingState("unlocked", "disabled", "dependency,failed", "providingservice",
- "disableDependency");
- assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
-
- logger.info("??? StateTransition testcase 254");
- se = st.getEndingState("unlocked", "disabled", "dependency,failed", "providingservice",
- "enableNoDependency");
- assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
-
- logger.info("??? StateTransition testcase 255");
- se = st.getEndingState("unlocked", "disabled", "dependency,failed", "providingservice", "promote");
- assertEquals("coldstandby,unlocked,disabled,dependency,failed,StandbyStatusException", makeString(se));
-
- logger.info("??? StateTransition testcase 256");
- se = st.getEndingState("unlocked", "disabled", "dependency,failed", "providingservice", "demote");
- assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
-
- logger.info("??? StateTransition testcase 257");
- se = st.getEndingState("locked", "enabled", "null", "null", "demote");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
-
- logger.info("??? StateTransition testcase 258");
- se = st.getEndingState("locked", "enabled", "null", "null", "unlock");
- assertEquals("null,unlocked,enabled,null,", makeString(se));
-
- logger.info("??? StateTransition testcase 259");
- se = st.getEndingState("locked", "enabled", "null", "null", "disableFailed");
- assertEquals("null,locked,disabled,failed,", makeString(se));
-
- logger.info("??? StateTransition testcase 260");
- se = st.getEndingState("locked", "enabled", "null", "null", "enableNotFailed");
- assertEquals("null,locked,enabled,null,", makeString(se));
-
- logger.info("??? StateTransition testcase 261");
- se = st.getEndingState("locked", "enabled", "null", "null", "disableDependency");
- assertEquals("null,locked,disabled,dependency,", makeString(se));
-
- logger.info("??? StateTransition testcase 262");
- se = st.getEndingState("locked", "enabled", "null", "null", "enableNoDependency");
- assertEquals("null,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 265");
+ se = st.getEndingState(LOCKED, ENABLED, "null", COLDSTANDBY, DEMOTE);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 263");
- se = st.getEndingState("locked", "enabled", "null", "null", "promote");
- assertEquals("coldstandby,locked,enabled,null,StandbyStatusException", makeString(se));
+ logger.info("??? StateTransition testcase 266");
+ se = st.getEndingState(LOCKED, ENABLED, "null", COLDSTANDBY, UNLOCK);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 264");
- se = st.getEndingState("locked", "enabled", "null", "null", "demote");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 267");
+ se = st.getEndingState(LOCKED, ENABLED, "null", COLDSTANDBY, DISABLE_FAILED);
+ assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 265");
- se = st.getEndingState("locked", "enabled", "null", "coldstandby", "demote");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 268");
+ se = st.getEndingState(LOCKED, ENABLED, "null", COLDSTANDBY, ENABLE_NOT_FAILED);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 266");
- se = st.getEndingState("locked", "enabled", "null", "coldstandby", "unlock");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 269");
+ se = st.getEndingState(LOCKED, ENABLED, "null", COLDSTANDBY, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 267");
- se = st.getEndingState("locked", "enabled", "null", "coldstandby", "disableFailed");
- assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 270");
+ se = st.getEndingState(LOCKED, ENABLED, "null", COLDSTANDBY, ENABLE_NO_DEPENDENCY);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 268");
- se = st.getEndingState("locked", "enabled", "null", "coldstandby", "enableNotFailed");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 271");
+ se = st.getEndingState(LOCKED, ENABLED, "null", COLDSTANDBY, PROMOTE);
+ assertEquals("coldstandby,locked,enabled,null,StandbyStatusException", makeString(se));
- logger.info("??? StateTransition testcase 269");
- se = st.getEndingState("locked", "enabled", "null", "coldstandby", "disableDependency");
- assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 272");
+ se = st.getEndingState(LOCKED, ENABLED, "null", COLDSTANDBY, DEMOTE);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 270");
- se = st.getEndingState("locked", "enabled", "null", "coldstandby", "enableNoDependency");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 273");
+ se = st.getEndingState(LOCKED, ENABLED, "null", HOTSTANDBY, DEMOTE);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 271");
- se = st.getEndingState("locked", "enabled", "null", "coldstandby", "promote");
- assertEquals("coldstandby,locked,enabled,null,StandbyStatusException", makeString(se));
+ logger.info("??? StateTransition testcase 274");
+ se = st.getEndingState(LOCKED, ENABLED, "null", HOTSTANDBY, UNLOCK);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 272");
- se = st.getEndingState("locked", "enabled", "null", "coldstandby", "demote");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 275");
+ se = st.getEndingState(LOCKED, ENABLED, "null", HOTSTANDBY, DISABLE_FAILED);
+ assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 273");
- se = st.getEndingState("locked", "enabled", "null", "hotstandby", "demote");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 276");
+ se = st.getEndingState(LOCKED, ENABLED, "null", HOTSTANDBY, ENABLE_NOT_FAILED);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 274");
- se = st.getEndingState("locked", "enabled", "null", "hotstandby", "unlock");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 277");
+ se = st.getEndingState(LOCKED, ENABLED, "null", HOTSTANDBY, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 275");
- se = st.getEndingState("locked", "enabled", "null", "hotstandby", "disableFailed");
- assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 278");
+ se = st.getEndingState(LOCKED, ENABLED, "null", HOTSTANDBY, ENABLE_NO_DEPENDENCY);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 276");
- se = st.getEndingState("locked", "enabled", "null", "hotstandby", "enableNotFailed");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 279");
+ se = st.getEndingState(LOCKED, ENABLED, "null", HOTSTANDBY, PROMOTE);
+ assertEquals("coldstandby,locked,enabled,null,StandbyStateException", makeString(se));
- logger.info("??? StateTransition testcase 277");
- se = st.getEndingState("locked", "enabled", "null", "hotstandby", "disableDependency");
- assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 280");
+ se = st.getEndingState(LOCKED, ENABLED, "null", HOTSTANDBY, DEMOTE);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 278");
- se = st.getEndingState("locked", "enabled", "null", "hotstandby", "enableNoDependency");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 281");
+ se = st.getEndingState(LOCKED, ENABLED, "null", PROVIDINGSERVICE, DEMOTE);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 279");
- se = st.getEndingState("locked", "enabled", "null", "hotstandby", "promote");
- assertEquals("coldstandby,locked,enabled,null,StandbyStateException", makeString(se));
+ logger.info("??? StateTransition testcase 282");
+ se = st.getEndingState(LOCKED, ENABLED, "null", PROVIDINGSERVICE, UNLOCK);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 280");
- se = st.getEndingState("locked", "enabled", "null", "hotstandby", "demote");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 283");
+ se = st.getEndingState(LOCKED, ENABLED, "null", PROVIDINGSERVICE, DISABLE_FAILED);
+ assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 281");
- se = st.getEndingState("locked", "enabled", "null", "providingservice", "demote");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 284");
+ se = st.getEndingState(LOCKED, ENABLED, "null", PROVIDINGSERVICE, ENABLE_NOT_FAILED);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 282");
- se = st.getEndingState("locked", "enabled", "null", "providingservice", "unlock");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 285");
+ se = st.getEndingState(LOCKED, ENABLED, "null", PROVIDINGSERVICE, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 283");
- se = st.getEndingState("locked", "enabled", "null", "providingservice", "disableFailed");
- assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 286");
+ se = st.getEndingState(LOCKED, ENABLED, "null", PROVIDINGSERVICE, ENABLE_NO_DEPENDENCY);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 284");
- se = st.getEndingState("locked", "enabled", "null", "providingservice", "enableNotFailed");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 287");
+ se = st.getEndingState(LOCKED, ENABLED, "null", PROVIDINGSERVICE, PROMOTE);
+ assertEquals("coldstandby,locked,enabled,null,StandbyStateException", makeString(se));
- logger.info("??? StateTransition testcase 285");
- se = st.getEndingState("locked", "enabled", "null", "providingservice", "disableDependency");
- assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 288");
+ se = st.getEndingState(LOCKED, ENABLED, "null", PROVIDINGSERVICE, DEMOTE);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 286");
- se = st.getEndingState("locked", "enabled", "null", "providingservice", "enableNoDependency");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 289");
+ se = st.getEndingState(LOCKED, ENABLED, FAILED, "null", DEMOTE);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 287");
- se = st.getEndingState("locked", "enabled", "null", "providingservice", "promote");
- assertEquals("coldstandby,locked,enabled,null,StandbyStateException", makeString(se));
+ logger.info("??? StateTransition testcase 290");
+ se = st.getEndingState(LOCKED, ENABLED, FAILED, "null", UNLOCK);
+ assertEquals("null,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 288");
- se = st.getEndingState("locked", "enabled", "null", "providingservice", "demote");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 291");
+ se = st.getEndingState(LOCKED, ENABLED, FAILED, "null", DISABLE_FAILED);
+ assertEquals("null,locked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 289");
- se = st.getEndingState("locked", "enabled", "failed", "null", "demote");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 292");
+ se = st.getEndingState(LOCKED, ENABLED, FAILED, "null", ENABLE_NOT_FAILED);
+ assertEquals("null,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 290");
- se = st.getEndingState("locked", "enabled", "failed", "null", "unlock");
- assertEquals("null,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 293");
+ se = st.getEndingState(LOCKED, ENABLED, FAILED, "null", DISABLE_DEPENDENCY);
+ assertEquals("null,locked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 291");
- se = st.getEndingState("locked", "enabled", "failed", "null", "disableFailed");
- assertEquals("null,locked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 294");
+ se = st.getEndingState(LOCKED, ENABLED, FAILED, "null", ENABLE_NO_DEPENDENCY);
+ assertEquals("null,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 292");
- se = st.getEndingState("locked", "enabled", "failed", "null", "enableNotFailed");
- assertEquals("null,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 295");
+ se = st.getEndingState(LOCKED, ENABLED, FAILED, "null", PROMOTE);
+ assertEquals("coldstandby,locked,enabled,null,StandbyStatusException", makeString(se));
- logger.info("??? StateTransition testcase 293");
- se = st.getEndingState("locked", "enabled", "failed", "null", "disableDependency");
- assertEquals("null,locked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 296");
+ se = st.getEndingState(LOCKED, ENABLED, FAILED, "null", DEMOTE);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 294");
- se = st.getEndingState("locked", "enabled", "failed", "null", "enableNoDependency");
- assertEquals("null,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 297");
+ se = st.getEndingState(LOCKED, ENABLED, FAILED, COLDSTANDBY, DEMOTE);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 295");
- se = st.getEndingState("locked", "enabled", "failed", "null", "promote");
- assertEquals("coldstandby,locked,enabled,null,StandbyStatusException", makeString(se));
+ logger.info("??? StateTransition testcase 298");
+ se = st.getEndingState(LOCKED, ENABLED, FAILED, COLDSTANDBY, UNLOCK);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 296");
- se = st.getEndingState("locked", "enabled", "failed", "null", "demote");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 299");
+ se = st.getEndingState(LOCKED, ENABLED, FAILED, COLDSTANDBY, DISABLE_FAILED);
+ assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 297");
- se = st.getEndingState("locked", "enabled", "failed", "coldstandby", "demote");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 300");
+ se = st.getEndingState(LOCKED, ENABLED, FAILED, COLDSTANDBY, ENABLE_NOT_FAILED);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 298");
- se = st.getEndingState("locked", "enabled", "failed", "coldstandby", "unlock");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 301");
+ se = st.getEndingState(LOCKED, ENABLED, FAILED, COLDSTANDBY, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 299");
- se = st.getEndingState("locked", "enabled", "failed", "coldstandby", "disableFailed");
- assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 302");
+ se = st.getEndingState(LOCKED, ENABLED, FAILED, COLDSTANDBY, ENABLE_NO_DEPENDENCY);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 300");
- se = st.getEndingState("locked", "enabled", "failed", "coldstandby", "enableNotFailed");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 303");
+ se = st.getEndingState(LOCKED, ENABLED, FAILED, COLDSTANDBY, PROMOTE);
+ assertEquals("coldstandby,locked,enabled,null,StandbyStatusException", makeString(se));
- logger.info("??? StateTransition testcase 301");
- se = st.getEndingState("locked", "enabled", "failed", "coldstandby", "disableDependency");
- assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 304");
+ se = st.getEndingState(LOCKED, ENABLED, FAILED, COLDSTANDBY, DEMOTE);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 302");
- se = st.getEndingState("locked", "enabled", "failed", "coldstandby", "enableNoDependency");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 305");
+ se = st.getEndingState(LOCKED, ENABLED, FAILED, HOTSTANDBY, DEMOTE);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 303");
- se = st.getEndingState("locked", "enabled", "failed", "coldstandby", "promote");
- assertEquals("coldstandby,locked,enabled,null,StandbyStatusException", makeString(se));
+ logger.info("??? StateTransition testcase 306");
+ se = st.getEndingState(LOCKED, ENABLED, FAILED, HOTSTANDBY, UNLOCK);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 304");
- se = st.getEndingState("locked", "enabled", "failed", "coldstandby", "demote");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 307");
+ se = st.getEndingState(LOCKED, ENABLED, FAILED, HOTSTANDBY, DISABLE_FAILED);
+ assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 305");
- se = st.getEndingState("locked", "enabled", "failed", "hotstandby", "demote");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 308");
+ se = st.getEndingState(LOCKED, ENABLED, FAILED, HOTSTANDBY, ENABLE_NOT_FAILED);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 306");
- se = st.getEndingState("locked", "enabled", "failed", "hotstandby", "unlock");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 309");
+ se = st.getEndingState(LOCKED, ENABLED, FAILED, HOTSTANDBY, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 307");
- se = st.getEndingState("locked", "enabled", "failed", "hotstandby", "disableFailed");
- assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 310");
+ se = st.getEndingState(LOCKED, ENABLED, FAILED, HOTSTANDBY, ENABLE_NO_DEPENDENCY);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 308");
- se = st.getEndingState("locked", "enabled", "failed", "hotstandby", "enableNotFailed");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 311");
+ se = st.getEndingState(LOCKED, ENABLED, FAILED, HOTSTANDBY, PROMOTE);
+ assertEquals("coldstandby,locked,enabled,null,StandbyStatusException", makeString(se));
- logger.info("??? StateTransition testcase 309");
- se = st.getEndingState("locked", "enabled", "failed", "hotstandby", "disableDependency");
- assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 312");
+ se = st.getEndingState(LOCKED, ENABLED, FAILED, HOTSTANDBY, DEMOTE);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 310");
- se = st.getEndingState("locked", "enabled", "failed", "hotstandby", "enableNoDependency");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 313");
+ se = st.getEndingState(LOCKED, ENABLED, FAILED, PROVIDINGSERVICE, DEMOTE);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 311");
- se = st.getEndingState("locked", "enabled", "failed", "hotstandby", "promote");
- assertEquals("coldstandby,locked,enabled,null,StandbyStatusException", makeString(se));
+ logger.info("??? StateTransition testcase 314");
+ se = st.getEndingState(LOCKED, ENABLED, FAILED, PROVIDINGSERVICE, UNLOCK);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 312");
- se = st.getEndingState("locked", "enabled", "failed", "hotstandby", "demote");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 315");
+ se = st.getEndingState(LOCKED, ENABLED, FAILED, PROVIDINGSERVICE, DISABLE_FAILED);
+ assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 313");
- se = st.getEndingState("locked", "enabled", "failed", "providingservice", "demote");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 316");
+ se = st.getEndingState(LOCKED, ENABLED, FAILED, PROVIDINGSERVICE, ENABLE_NOT_FAILED);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 314");
- se = st.getEndingState("locked", "enabled", "failed", "providingservice", "unlock");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 317");
+ se = st.getEndingState(LOCKED, ENABLED, FAILED, PROVIDINGSERVICE, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 315");
- se = st.getEndingState("locked", "enabled", "failed", "providingservice", "disableFailed");
- assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 318");
+ se = st.getEndingState(LOCKED, ENABLED, FAILED, PROVIDINGSERVICE, ENABLE_NO_DEPENDENCY);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 316");
- se = st.getEndingState("locked", "enabled", "failed", "providingservice", "enableNotFailed");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 319");
+ se = st.getEndingState(LOCKED, ENABLED, FAILED, PROVIDINGSERVICE, PROMOTE);
+ assertEquals("coldstandby,locked,enabled,null,StandbyStatusException", makeString(se));
- logger.info("??? StateTransition testcase 317");
- se = st.getEndingState("locked", "enabled", "failed", "providingservice", "disableDependency");
- assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 320");
+ se = st.getEndingState(LOCKED, ENABLED, FAILED, PROVIDINGSERVICE, DEMOTE);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 318");
- se = st.getEndingState("locked", "enabled", "failed", "providingservice", "enableNoDependency");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 321");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY, "null", DEMOTE);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 319");
- se = st.getEndingState("locked", "enabled", "failed", "providingservice", "promote");
- assertEquals("coldstandby,locked,enabled,null,StandbyStatusException", makeString(se));
+ logger.info("??? StateTransition testcase 322");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY, "null", UNLOCK);
+ assertEquals("null,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 320");
- se = st.getEndingState("locked", "enabled", "failed", "providingservice", "demote");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 323");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY, "null", DISABLE_FAILED);
+ assertEquals("null,locked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 321");
- se = st.getEndingState("locked", "enabled", "dependency", "null", "demote");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 324");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY, "null", ENABLE_NOT_FAILED);
+ assertEquals("null,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 322");
- se = st.getEndingState("locked", "enabled", "dependency", "null", "unlock");
- assertEquals("null,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 325");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY, "null", DISABLE_DEPENDENCY);
+ assertEquals("null,locked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 323");
- se = st.getEndingState("locked", "enabled", "dependency", "null", "disableFailed");
- assertEquals("null,locked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 326");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY, "null", ENABLE_NO_DEPENDENCY);
+ assertEquals("null,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 324");
- se = st.getEndingState("locked", "enabled", "dependency", "null", "enableNotFailed");
- assertEquals("null,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 327");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY, "null", PROMOTE);
+ assertEquals("coldstandby,locked,enabled,null,StandbyStatusException", makeString(se));
- logger.info("??? StateTransition testcase 325");
- se = st.getEndingState("locked", "enabled", "dependency", "null", "disableDependency");
- assertEquals("null,locked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 328");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY, "null", DEMOTE);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 326");
- se = st.getEndingState("locked", "enabled", "dependency", "null", "enableNoDependency");
- assertEquals("null,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 329");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY, COLDSTANDBY, DEMOTE);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 327");
- se = st.getEndingState("locked", "enabled", "dependency", "null", "promote");
- assertEquals("coldstandby,locked,enabled,null,StandbyStatusException", makeString(se));
+ logger.info("??? StateTransition testcase 330");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY, COLDSTANDBY, UNLOCK);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 328");
- se = st.getEndingState("locked", "enabled", "dependency", "null", "demote");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 331");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY, COLDSTANDBY, DISABLE_FAILED);
+ assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 329");
- se = st.getEndingState("locked", "enabled", "dependency", "coldstandby", "demote");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 332");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY, COLDSTANDBY, ENABLE_NOT_FAILED);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 330");
- se = st.getEndingState("locked", "enabled", "dependency", "coldstandby", "unlock");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 333");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY, COLDSTANDBY, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 331");
- se = st.getEndingState("locked", "enabled", "dependency", "coldstandby", "disableFailed");
- assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 334");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY, COLDSTANDBY, ENABLE_NO_DEPENDENCY);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 332");
- se = st.getEndingState("locked", "enabled", "dependency", "coldstandby", "enableNotFailed");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 335");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY, COLDSTANDBY, PROMOTE);
+ assertEquals("coldstandby,locked,enabled,null,StandbyStatusException", makeString(se));
- logger.info("??? StateTransition testcase 333");
- se = st.getEndingState("locked", "enabled", "dependency", "coldstandby", "disableDependency");
- assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 336");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY, COLDSTANDBY, DEMOTE);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 334");
- se = st.getEndingState("locked", "enabled", "dependency", "coldstandby", "enableNoDependency");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 337");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY, HOTSTANDBY, DEMOTE);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 335");
- se = st.getEndingState("locked", "enabled", "dependency", "coldstandby", "promote");
- assertEquals("coldstandby,locked,enabled,null,StandbyStatusException", makeString(se));
+ logger.info("??? StateTransition testcase 338");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY, HOTSTANDBY, UNLOCK);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 336");
- se = st.getEndingState("locked", "enabled", "dependency", "coldstandby", "demote");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 339");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY, HOTSTANDBY, DISABLE_FAILED);
+ assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 337");
- se = st.getEndingState("locked", "enabled", "dependency", "hotstandby", "demote");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 340");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY, HOTSTANDBY, ENABLE_NOT_FAILED);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 338");
- se = st.getEndingState("locked", "enabled", "dependency", "hotstandby", "unlock");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 341");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY, HOTSTANDBY, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 339");
- se = st.getEndingState("locked", "enabled", "dependency", "hotstandby", "disableFailed");
- assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 342");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY, HOTSTANDBY, ENABLE_NO_DEPENDENCY);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 340");
- se = st.getEndingState("locked", "enabled", "dependency", "hotstandby", "enableNotFailed");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 343");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY, HOTSTANDBY, PROMOTE);
+ assertEquals("coldstandby,locked,enabled,null,StandbyStatusException", makeString(se));
- logger.info("??? StateTransition testcase 341");
- se = st.getEndingState("locked", "enabled", "dependency", "hotstandby", "disableDependency");
- assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 344");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY, HOTSTANDBY, DEMOTE);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 342");
- se = st.getEndingState("locked", "enabled", "dependency", "hotstandby", "enableNoDependency");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 345");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY, PROVIDINGSERVICE, DEMOTE);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 343");
- se = st.getEndingState("locked", "enabled", "dependency", "hotstandby", "promote");
- assertEquals("coldstandby,locked,enabled,null,StandbyStatusException", makeString(se));
+ logger.info("??? StateTransition testcase 346");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY, PROVIDINGSERVICE, UNLOCK);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 344");
- se = st.getEndingState("locked", "enabled", "dependency", "hotstandby", "demote");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 347");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY, PROVIDINGSERVICE, DISABLE_FAILED);
+ assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 345");
- se = st.getEndingState("locked", "enabled", "dependency", "providingservice", "demote");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 348");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY, PROVIDINGSERVICE, ENABLE_NOT_FAILED);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 346");
- se = st.getEndingState("locked", "enabled", "dependency", "providingservice", "unlock");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 349");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY, PROVIDINGSERVICE, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 347");
- se = st.getEndingState("locked", "enabled", "dependency", "providingservice", "disableFailed");
- assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 350");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY, PROVIDINGSERVICE, ENABLE_NO_DEPENDENCY);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 348");
- se = st.getEndingState("locked", "enabled", "dependency", "providingservice", "enableNotFailed");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 351");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY, PROVIDINGSERVICE, PROMOTE);
+ assertEquals("coldstandby,locked,enabled,null,StandbyStatusException", makeString(se));
- logger.info("??? StateTransition testcase 349");
- se = st.getEndingState("locked", "enabled", "dependency", "providingservice", "disableDependency");
- assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 352");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY, PROVIDINGSERVICE, DEMOTE);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 350");
- se = st.getEndingState("locked", "enabled", "dependency", "providingservice", "enableNoDependency");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 353");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY_FAILED, "null", DEMOTE);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 351");
- se = st.getEndingState("locked", "enabled", "dependency", "providingservice", "promote");
- assertEquals("coldstandby,locked,enabled,null,StandbyStatusException", makeString(se));
+ logger.info("??? StateTransition testcase 354");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY_FAILED, "null", UNLOCK);
+ assertEquals("null,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 352");
- se = st.getEndingState("locked", "enabled", "dependency", "providingservice", "demote");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 355");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY_FAILED, "null", DISABLE_FAILED);
+ assertEquals("null,locked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 353");
- se = st.getEndingState("locked", "enabled", "dependency,failed", "null", "demote");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 356");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY_FAILED, "null", ENABLE_NOT_FAILED);
+ assertEquals("null,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 354");
- se = st.getEndingState("locked", "enabled", "dependency,failed", "null", "unlock");
- assertEquals("null,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 357");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY_FAILED, "null", DISABLE_DEPENDENCY);
+ assertEquals("null,locked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 355");
- se = st.getEndingState("locked", "enabled", "dependency,failed", "null", "disableFailed");
- assertEquals("null,locked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 358");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY_FAILED, "null", ENABLE_NO_DEPENDENCY);
+ assertEquals("null,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 356");
- se = st.getEndingState("locked", "enabled", "dependency,failed", "null", "enableNotFailed");
- assertEquals("null,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 359");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY_FAILED, "null", PROMOTE);
+ assertEquals("coldstandby,locked,enabled,null,StandbyStatusException", makeString(se));
- logger.info("??? StateTransition testcase 357");
- se = st.getEndingState("locked", "enabled", "dependency,failed", "null", "disableDependency");
- assertEquals("null,locked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 360");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY_FAILED, "null", DEMOTE);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 358");
- se = st.getEndingState("locked", "enabled", "dependency,failed", "null", "enableNoDependency");
- assertEquals("null,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 361");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY_FAILED, COLDSTANDBY, DEMOTE);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 359");
- se = st.getEndingState("locked", "enabled", "dependency,failed", "null", "promote");
- assertEquals("coldstandby,locked,enabled,null,StandbyStatusException", makeString(se));
+ logger.info("??? StateTransition testcase 362");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY_FAILED, COLDSTANDBY, UNLOCK);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 360");
- se = st.getEndingState("locked", "enabled", "dependency,failed", "null", "demote");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 363");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY_FAILED, COLDSTANDBY, DISABLE_FAILED);
+ assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 361");
- se = st.getEndingState("locked", "enabled", "dependency,failed", "coldstandby", "demote");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 364");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY_FAILED, COLDSTANDBY, ENABLE_NOT_FAILED);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 362");
- se = st.getEndingState("locked", "enabled", "dependency,failed", "coldstandby", "unlock");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 365");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY_FAILED, COLDSTANDBY, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 363");
- se = st.getEndingState("locked", "enabled", "dependency,failed", "coldstandby", "disableFailed");
- assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 366");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY_FAILED, COLDSTANDBY, ENABLE_NO_DEPENDENCY);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 364");
- se = st.getEndingState("locked", "enabled", "dependency,failed", "coldstandby", "enableNotFailed");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 367");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY_FAILED, COLDSTANDBY, PROMOTE);
+ assertEquals("coldstandby,locked,enabled,null,StandbyStatusException", makeString(se));
- logger.info("??? StateTransition testcase 365");
- se = st.getEndingState("locked", "enabled", "dependency,failed", "coldstandby", "disableDependency");
- assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 368");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY_FAILED, COLDSTANDBY, DEMOTE);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 366");
- se = st.getEndingState("locked", "enabled", "dependency,failed", "coldstandby", "enableNoDependency");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 369");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY_FAILED, HOTSTANDBY, DEMOTE);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 367");
- se = st.getEndingState("locked", "enabled", "dependency,failed", "coldstandby", "promote");
- assertEquals("coldstandby,locked,enabled,null,StandbyStatusException", makeString(se));
+ logger.info("??? StateTransition testcase 370");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY_FAILED, HOTSTANDBY, UNLOCK);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 368");
- se = st.getEndingState("locked", "enabled", "dependency,failed", "coldstandby", "demote");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 371");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY_FAILED, HOTSTANDBY, DISABLE_FAILED);
+ assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 369");
- se = st.getEndingState("locked", "enabled", "dependency,failed", "hotstandby", "demote");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 372");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY_FAILED, HOTSTANDBY, ENABLE_NOT_FAILED);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 370");
- se = st.getEndingState("locked", "enabled", "dependency,failed", "hotstandby", "unlock");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 373");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY_FAILED, HOTSTANDBY, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 371");
- se = st.getEndingState("locked", "enabled", "dependency,failed", "hotstandby", "disableFailed");
- assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 374");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY_FAILED, HOTSTANDBY, ENABLE_NO_DEPENDENCY);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 372");
- se = st.getEndingState("locked", "enabled", "dependency,failed", "hotstandby", "enableNotFailed");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 375");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY_FAILED, HOTSTANDBY, PROMOTE);
+ assertEquals("coldstandby,locked,enabled,null,StandbyStatusException", makeString(se));
- logger.info("??? StateTransition testcase 373");
- se = st.getEndingState("locked", "enabled", "dependency,failed", "hotstandby", "disableDependency");
- assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 376");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY_FAILED, HOTSTANDBY, DEMOTE);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 374");
- se = st.getEndingState("locked", "enabled", "dependency,failed", "hotstandby", "enableNoDependency");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 377");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY_FAILED, PROVIDINGSERVICE, DEMOTE);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 375");
- se = st.getEndingState("locked", "enabled", "dependency,failed", "hotstandby", "promote");
- assertEquals("coldstandby,locked,enabled,null,StandbyStatusException", makeString(se));
+ logger.info("??? StateTransition testcase 378");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY_FAILED, PROVIDINGSERVICE, UNLOCK);
+ assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 376");
- se = st.getEndingState("locked", "enabled", "dependency,failed", "hotstandby", "demote");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 379");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY_FAILED, PROVIDINGSERVICE, DISABLE_FAILED);
+ assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 377");
- se = st.getEndingState("locked", "enabled", "dependency,failed", "providingservice", "demote");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 380");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY_FAILED, PROVIDINGSERVICE, ENABLE_NOT_FAILED);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 378");
- se = st.getEndingState("locked", "enabled", "dependency,failed", "providingservice", "unlock");
- assertEquals("hotstandby,unlocked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 381");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY_FAILED, PROVIDINGSERVICE,
+ DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
+
+ logger.info("??? StateTransition testcase 382");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY_FAILED, PROVIDINGSERVICE,
+ ENABLE_NO_DEPENDENCY);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 379");
- se = st.getEndingState("locked", "enabled", "dependency,failed", "providingservice", "disableFailed");
- assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 383");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY_FAILED, PROVIDINGSERVICE, PROMOTE);
+ assertEquals("coldstandby,locked,enabled,null,StandbyStatusException", makeString(se));
- logger.info("??? StateTransition testcase 380");
- se = st.getEndingState("locked", "enabled", "dependency,failed", "providingservice", "enableNotFailed");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 384");
+ se = st.getEndingState(LOCKED, ENABLED, DEPENDENCY_FAILED, PROVIDINGSERVICE, DEMOTE);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 381");
- se = st.getEndingState("locked", "enabled", "dependency,failed", "providingservice",
- "disableDependency");
- assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
-
- logger.info("??? StateTransition testcase 382");
- se = st.getEndingState("locked", "enabled", "dependency,failed", "providingservice",
- "enableNoDependency");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 385");
+ se = st.getEndingState(LOCKED, DISABLED, "null", "null", DEMOTE);
+ assertEquals("coldstandby,locked,disabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 383");
- se = st.getEndingState("locked", "enabled", "dependency,failed", "providingservice", "promote");
- assertEquals("coldstandby,locked,enabled,null,StandbyStatusException", makeString(se));
+ logger.info("??? StateTransition testcase 386");
+ se = st.getEndingState(LOCKED, DISABLED, "null", "null", UNLOCK);
+ assertEquals("null,unlocked,disabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 384");
- se = st.getEndingState("locked", "enabled", "dependency,failed", "providingservice", "demote");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 387");
+ se = st.getEndingState(LOCKED, DISABLED, "null", "null", DISABLE_FAILED);
+ assertEquals("null,locked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 385");
- se = st.getEndingState("locked", "disabled", "null", "null", "demote");
- assertEquals("coldstandby,locked,disabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 388");
+ se = st.getEndingState(LOCKED, DISABLED, "null", "null", ENABLE_NOT_FAILED);
+ assertEquals("null,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 386");
- se = st.getEndingState("locked", "disabled", "null", "null", "unlock");
- assertEquals("null,unlocked,disabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 389");
+ se = st.getEndingState(LOCKED, DISABLED, "null", "null", DISABLE_DEPENDENCY);
+ assertEquals("null,locked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 387");
- se = st.getEndingState("locked", "disabled", "null", "null", "disableFailed");
- assertEquals("null,locked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 390");
+ se = st.getEndingState(LOCKED, DISABLED, "null", "null", ENABLE_NO_DEPENDENCY);
+ assertEquals("null,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 388");
- se = st.getEndingState("locked", "disabled", "null", "null", "enableNotFailed");
- assertEquals("null,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 391");
+ se = st.getEndingState(LOCKED, DISABLED, "null", "null", PROMOTE);
+ assertEquals("coldstandby,locked,disabled,null,StandbyStatusException", makeString(se));
- logger.info("??? StateTransition testcase 389");
- se = st.getEndingState("locked", "disabled", "null", "null", "disableDependency");
- assertEquals("null,locked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 392");
+ se = st.getEndingState(LOCKED, DISABLED, "null", "null", DEMOTE);
+ assertEquals("coldstandby,locked,disabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 390");
- se = st.getEndingState("locked", "disabled", "null", "null", "enableNoDependency");
- assertEquals("null,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 393");
+ se = st.getEndingState(LOCKED, DISABLED, "null", COLDSTANDBY, DEMOTE);
+ assertEquals("coldstandby,locked,disabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 391");
- se = st.getEndingState("locked", "disabled", "null", "null", "promote");
- assertEquals("coldstandby,locked,disabled,null,StandbyStatusException", makeString(se));
+ logger.info("??? StateTransition testcase 394");
+ se = st.getEndingState(LOCKED, DISABLED, "null", COLDSTANDBY, UNLOCK);
+ assertEquals("coldstandby,unlocked,disabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 392");
- se = st.getEndingState("locked", "disabled", "null", "null", "demote");
- assertEquals("coldstandby,locked,disabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 395");
+ se = st.getEndingState(LOCKED, DISABLED, "null", COLDSTANDBY, DISABLE_FAILED);
+ assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 393");
- se = st.getEndingState("locked", "disabled", "null", "coldstandby", "demote");
- assertEquals("coldstandby,locked,disabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 396");
+ se = st.getEndingState(LOCKED, DISABLED, "null", COLDSTANDBY, ENABLE_NOT_FAILED);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 394");
- se = st.getEndingState("locked", "disabled", "null", "coldstandby", "unlock");
- assertEquals("coldstandby,unlocked,disabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 397");
+ se = st.getEndingState(LOCKED, DISABLED, "null", COLDSTANDBY, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 395");
- se = st.getEndingState("locked", "disabled", "null", "coldstandby", "disableFailed");
- assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 398");
+ se = st.getEndingState(LOCKED, DISABLED, "null", COLDSTANDBY, ENABLE_NO_DEPENDENCY);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 396");
- se = st.getEndingState("locked", "disabled", "null", "coldstandby", "enableNotFailed");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 399");
+ se = st.getEndingState(LOCKED, DISABLED, "null", COLDSTANDBY, PROMOTE);
+ assertEquals("coldstandby,locked,disabled,null,StandbyStatusException", makeString(se));
- logger.info("??? StateTransition testcase 397");
- se = st.getEndingState("locked", "disabled", "null", "coldstandby", "disableDependency");
- assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 400");
+ se = st.getEndingState(LOCKED, DISABLED, "null", COLDSTANDBY, DEMOTE);
+ assertEquals("coldstandby,locked,disabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 398");
- se = st.getEndingState("locked", "disabled", "null", "coldstandby", "enableNoDependency");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 401");
+ se = st.getEndingState(LOCKED, DISABLED, "null", HOTSTANDBY, DEMOTE);
+ assertEquals("coldstandby,locked,disabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 399");
- se = st.getEndingState("locked", "disabled", "null", "coldstandby", "promote");
- assertEquals("coldstandby,locked,disabled,null,StandbyStatusException", makeString(se));
+ logger.info("??? StateTransition testcase 402");
+ se = st.getEndingState(LOCKED, DISABLED, "null", HOTSTANDBY, UNLOCK);
+ assertEquals("coldstandby,unlocked,disabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 400");
- se = st.getEndingState("locked", "disabled", "null", "coldstandby", "demote");
- assertEquals("coldstandby,locked,disabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 403");
+ se = st.getEndingState(LOCKED, DISABLED, "null", HOTSTANDBY, DISABLE_FAILED);
+ assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 401");
- se = st.getEndingState("locked", "disabled", "null", "hotstandby", "demote");
- assertEquals("coldstandby,locked,disabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 404");
+ se = st.getEndingState(LOCKED, DISABLED, "null", HOTSTANDBY, ENABLE_NOT_FAILED);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 402");
- se = st.getEndingState("locked", "disabled", "null", "hotstandby", "unlock");
- assertEquals("coldstandby,unlocked,disabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 405");
+ se = st.getEndingState(LOCKED, DISABLED, "null", HOTSTANDBY, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 403");
- se = st.getEndingState("locked", "disabled", "null", "hotstandby", "disableFailed");
- assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 406");
+ se = st.getEndingState(LOCKED, DISABLED, "null", HOTSTANDBY, ENABLE_NO_DEPENDENCY);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 404");
- se = st.getEndingState("locked", "disabled", "null", "hotstandby", "enableNotFailed");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 407");
+ se = st.getEndingState(LOCKED, DISABLED, "null", HOTSTANDBY, PROMOTE);
+ assertEquals("coldstandby,locked,disabled,null,StandbyStatusException", makeString(se));
- logger.info("??? StateTransition testcase 405");
- se = st.getEndingState("locked", "disabled", "null", "hotstandby", "disableDependency");
- assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 408");
+ se = st.getEndingState(LOCKED, DISABLED, "null", HOTSTANDBY, DEMOTE);
+ assertEquals("coldstandby,locked,disabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 406");
- se = st.getEndingState("locked", "disabled", "null", "hotstandby", "enableNoDependency");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 409");
+ se = st.getEndingState(LOCKED, DISABLED, "null", PROVIDINGSERVICE, DEMOTE);
+ assertEquals("coldstandby,locked,disabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 407");
- se = st.getEndingState("locked", "disabled", "null", "hotstandby", "promote");
- assertEquals("coldstandby,locked,disabled,null,StandbyStatusException", makeString(se));
+ logger.info("??? StateTransition testcase 410");
+ se = st.getEndingState(LOCKED, DISABLED, "null", PROVIDINGSERVICE, UNLOCK);
+ assertEquals("coldstandby,unlocked,disabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 408");
- se = st.getEndingState("locked", "disabled", "null", "hotstandby", "demote");
- assertEquals("coldstandby,locked,disabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 411");
+ se = st.getEndingState(LOCKED, DISABLED, "null", PROVIDINGSERVICE, DISABLE_FAILED);
+ assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 409");
- se = st.getEndingState("locked", "disabled", "null", "providingservice", "demote");
- assertEquals("coldstandby,locked,disabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 412");
+ se = st.getEndingState(LOCKED, DISABLED, "null", PROVIDINGSERVICE, ENABLE_NOT_FAILED);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 410");
- se = st.getEndingState("locked", "disabled", "null", "providingservice", "unlock");
- assertEquals("coldstandby,unlocked,disabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 413");
+ se = st.getEndingState(LOCKED, DISABLED, "null", PROVIDINGSERVICE, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 411");
- se = st.getEndingState("locked", "disabled", "null", "providingservice", "disableFailed");
- assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 414");
+ se = st.getEndingState(LOCKED, DISABLED, "null", PROVIDINGSERVICE, ENABLE_NO_DEPENDENCY);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 412");
- se = st.getEndingState("locked", "disabled", "null", "providingservice", "enableNotFailed");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 415");
+ se = st.getEndingState(LOCKED, DISABLED, "null", PROVIDINGSERVICE, PROMOTE);
+ assertEquals("coldstandby,locked,disabled,null,StandbyStatusException", makeString(se));
- logger.info("??? StateTransition testcase 413");
- se = st.getEndingState("locked", "disabled", "null", "providingservice", "disableDependency");
- assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 416");
+ se = st.getEndingState(LOCKED, DISABLED, "null", PROVIDINGSERVICE, DEMOTE);
+ assertEquals("coldstandby,locked,disabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 414");
- se = st.getEndingState("locked", "disabled", "null", "providingservice", "enableNoDependency");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 417");
+ se = st.getEndingState(LOCKED, DISABLED, FAILED, "null", DEMOTE);
+ assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 415");
- se = st.getEndingState("locked", "disabled", "null", "providingservice", "promote");
- assertEquals("coldstandby,locked,disabled,null,StandbyStatusException", makeString(se));
+ logger.info("??? StateTransition testcase 418");
+ se = st.getEndingState(LOCKED, DISABLED, FAILED, "null", UNLOCK);
+ assertEquals("null,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 416");
- se = st.getEndingState("locked", "disabled", "null", "providingservice", "demote");
- assertEquals("coldstandby,locked,disabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 419");
+ se = st.getEndingState(LOCKED, DISABLED, FAILED, "null", DISABLE_FAILED);
+ assertEquals("null,locked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 417");
- se = st.getEndingState("locked", "disabled", "failed", "null", "demote");
- assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 420");
+ se = st.getEndingState(LOCKED, DISABLED, FAILED, "null", ENABLE_NOT_FAILED);
+ assertEquals("null,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 418");
- se = st.getEndingState("locked", "disabled", "failed", "null", "unlock");
- assertEquals("null,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 421");
+ se = st.getEndingState(LOCKED, DISABLED, FAILED, "null", DISABLE_DEPENDENCY);
+ assertEquals("null,locked,disabled,dependency,failed,", makeString(se));
- logger.info("??? StateTransition testcase 419");
- se = st.getEndingState("locked", "disabled", "failed", "null", "disableFailed");
- assertEquals("null,locked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 422");
+ se = st.getEndingState(LOCKED, DISABLED, FAILED, "null", ENABLE_NO_DEPENDENCY);
+ assertEquals("null,locked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 420");
- se = st.getEndingState("locked", "disabled", "failed", "null", "enableNotFailed");
- assertEquals("null,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 423");
+ se = st.getEndingState(LOCKED, DISABLED, FAILED, "null", PROMOTE);
+ assertEquals("coldstandby,locked,disabled,failed,StandbyStatusException", makeString(se));
- logger.info("??? StateTransition testcase 421");
- se = st.getEndingState("locked", "disabled", "failed", "null", "disableDependency");
- assertEquals("null,locked,disabled,dependency,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 424");
+ se = st.getEndingState(LOCKED, DISABLED, FAILED, "null", DEMOTE);
+ assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 422");
- se = st.getEndingState("locked", "disabled", "failed", "null", "enableNoDependency");
- assertEquals("null,locked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 425");
+ se = st.getEndingState(LOCKED, DISABLED, FAILED, COLDSTANDBY, DEMOTE);
+ assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 423");
- se = st.getEndingState("locked", "disabled", "failed", "null", "promote");
- assertEquals("coldstandby,locked,disabled,failed,StandbyStatusException", makeString(se));
+ logger.info("??? StateTransition testcase 426");
+ se = st.getEndingState(LOCKED, DISABLED, FAILED, COLDSTANDBY, UNLOCK);
+ assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 424");
- se = st.getEndingState("locked", "disabled", "failed", "null", "demote");
- assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 427");
+ se = st.getEndingState(LOCKED, DISABLED, FAILED, COLDSTANDBY, DISABLE_FAILED);
+ assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 425");
- se = st.getEndingState("locked", "disabled", "failed", "coldstandby", "demote");
- assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 428");
+ se = st.getEndingState(LOCKED, DISABLED, FAILED, COLDSTANDBY, ENABLE_NOT_FAILED);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 426");
- se = st.getEndingState("locked", "disabled", "failed", "coldstandby", "unlock");
- assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 429");
+ se = st.getEndingState(LOCKED, DISABLED, FAILED, COLDSTANDBY, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,locked,disabled,dependency,failed,", makeString(se));
- logger.info("??? StateTransition testcase 427");
- se = st.getEndingState("locked", "disabled", "failed", "coldstandby", "disableFailed");
- assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 430");
+ se = st.getEndingState(LOCKED, DISABLED, FAILED, COLDSTANDBY, ENABLE_NO_DEPENDENCY);
+ assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 428");
- se = st.getEndingState("locked", "disabled", "failed", "coldstandby", "enableNotFailed");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 431");
+ se = st.getEndingState(LOCKED, DISABLED, FAILED, COLDSTANDBY, PROMOTE);
+ assertEquals("coldstandby,locked,disabled,failed,StandbyStatusException", makeString(se));
- logger.info("??? StateTransition testcase 429");
- se = st.getEndingState("locked", "disabled", "failed", "coldstandby", "disableDependency");
- assertEquals("coldstandby,locked,disabled,dependency,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 432");
+ se = st.getEndingState(LOCKED, DISABLED, FAILED, COLDSTANDBY, DEMOTE);
+ assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 430");
- se = st.getEndingState("locked", "disabled", "failed", "coldstandby", "enableNoDependency");
- assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 433");
+ se = st.getEndingState(LOCKED, DISABLED, FAILED, HOTSTANDBY, DEMOTE);
+ assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 431");
- se = st.getEndingState("locked", "disabled", "failed", "coldstandby", "promote");
- assertEquals("coldstandby,locked,disabled,failed,StandbyStatusException", makeString(se));
+ logger.info("??? StateTransition testcase 434");
+ se = st.getEndingState(LOCKED, DISABLED, FAILED, HOTSTANDBY, UNLOCK);
+ assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 432");
- se = st.getEndingState("locked", "disabled", "failed", "coldstandby", "demote");
- assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 435");
+ se = st.getEndingState(LOCKED, DISABLED, FAILED, HOTSTANDBY, DISABLE_FAILED);
+ assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 433");
- se = st.getEndingState("locked", "disabled", "failed", "hotstandby", "demote");
- assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 436");
+ se = st.getEndingState(LOCKED, DISABLED, FAILED, HOTSTANDBY, ENABLE_NOT_FAILED);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 434");
- se = st.getEndingState("locked", "disabled", "failed", "hotstandby", "unlock");
- assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 437");
+ se = st.getEndingState(LOCKED, DISABLED, FAILED, HOTSTANDBY, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,locked,disabled,dependency,failed,", makeString(se));
- logger.info("??? StateTransition testcase 435");
- se = st.getEndingState("locked", "disabled", "failed", "hotstandby", "disableFailed");
- assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 438");
+ se = st.getEndingState(LOCKED, DISABLED, FAILED, HOTSTANDBY, ENABLE_NO_DEPENDENCY);
+ assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 436");
- se = st.getEndingState("locked", "disabled", "failed", "hotstandby", "enableNotFailed");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 439");
+ se = st.getEndingState(LOCKED, DISABLED, FAILED, HOTSTANDBY, PROMOTE);
+ assertEquals("coldstandby,locked,disabled,failed,StandbyStatusException", makeString(se));
- logger.info("??? StateTransition testcase 437");
- se = st.getEndingState("locked", "disabled", "failed", "hotstandby", "disableDependency");
- assertEquals("coldstandby,locked,disabled,dependency,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 440");
+ se = st.getEndingState(LOCKED, DISABLED, FAILED, HOTSTANDBY, DEMOTE);
+ assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 438");
- se = st.getEndingState("locked", "disabled", "failed", "hotstandby", "enableNoDependency");
- assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 441");
+ se = st.getEndingState(LOCKED, DISABLED, FAILED, PROVIDINGSERVICE, DEMOTE);
+ assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 439");
- se = st.getEndingState("locked", "disabled", "failed", "hotstandby", "promote");
- assertEquals("coldstandby,locked,disabled,failed,StandbyStatusException", makeString(se));
+ logger.info("??? StateTransition testcase 442");
+ se = st.getEndingState(LOCKED, DISABLED, FAILED, PROVIDINGSERVICE, UNLOCK);
+ assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 440");
- se = st.getEndingState("locked", "disabled", "failed", "hotstandby", "demote");
- assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 443");
+ se = st.getEndingState(LOCKED, DISABLED, FAILED, PROVIDINGSERVICE, DISABLE_FAILED);
+ assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 441");
- se = st.getEndingState("locked", "disabled", "failed", "providingservice", "demote");
- assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 444");
+ se = st.getEndingState(LOCKED, DISABLED, FAILED, PROVIDINGSERVICE, ENABLE_NOT_FAILED);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 442");
- se = st.getEndingState("locked", "disabled", "failed", "providingservice", "unlock");
- assertEquals("coldstandby,unlocked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 445");
+ se = st.getEndingState(LOCKED, DISABLED, FAILED, PROVIDINGSERVICE, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,locked,disabled,dependency,failed,", makeString(se));
- logger.info("??? StateTransition testcase 443");
- se = st.getEndingState("locked", "disabled", "failed", "providingservice", "disableFailed");
- assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 446");
+ se = st.getEndingState(LOCKED, DISABLED, FAILED, PROVIDINGSERVICE, ENABLE_NO_DEPENDENCY);
+ assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 444");
- se = st.getEndingState("locked", "disabled", "failed", "providingservice", "enableNotFailed");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 447");
+ se = st.getEndingState(LOCKED, DISABLED, FAILED, PROVIDINGSERVICE, PROMOTE);
+ assertEquals("coldstandby,locked,disabled,failed,StandbyStatusException", makeString(se));
- logger.info("??? StateTransition testcase 445");
- se = st.getEndingState("locked", "disabled", "failed", "providingservice", "disableDependency");
- assertEquals("coldstandby,locked,disabled,dependency,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 448");
+ se = st.getEndingState(LOCKED, DISABLED, FAILED, PROVIDINGSERVICE, DEMOTE);
+ assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 446");
- se = st.getEndingState("locked", "disabled", "failed", "providingservice", "enableNoDependency");
- assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 449");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY, "null", DEMOTE);
+ assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 447");
- se = st.getEndingState("locked", "disabled", "failed", "providingservice", "promote");
- assertEquals("coldstandby,locked,disabled,failed,StandbyStatusException", makeString(se));
+ logger.info("??? StateTransition testcase 450");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY, "null", UNLOCK);
+ assertEquals("null,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 448");
- se = st.getEndingState("locked", "disabled", "failed", "providingservice", "demote");
- assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 451");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY, "null", DISABLE_FAILED);
+ assertEquals("null,locked,disabled,dependency,failed,", makeString(se));
- logger.info("??? StateTransition testcase 449");
- se = st.getEndingState("locked", "disabled", "dependency", "null", "demote");
- assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 452");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY, "null", ENABLE_NOT_FAILED);
+ assertEquals("null,locked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 450");
- se = st.getEndingState("locked", "disabled", "dependency", "null", "unlock");
- assertEquals("null,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 453");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY, "null", DISABLE_DEPENDENCY);
+ assertEquals("null,locked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 451");
- se = st.getEndingState("locked", "disabled", "dependency", "null", "disableFailed");
- assertEquals("null,locked,disabled,dependency,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 454");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY, "null", ENABLE_NO_DEPENDENCY);
+ assertEquals("null,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 452");
- se = st.getEndingState("locked", "disabled", "dependency", "null", "enableNotFailed");
- assertEquals("null,locked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 455");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY, "null", PROMOTE);
+ assertEquals("coldstandby,locked,disabled,dependency,StandbyStatusException", makeString(se));
- logger.info("??? StateTransition testcase 453");
- se = st.getEndingState("locked", "disabled", "dependency", "null", "disableDependency");
- assertEquals("null,locked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 456");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY, "null", DEMOTE);
+ assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 454");
- se = st.getEndingState("locked", "disabled", "dependency", "null", "enableNoDependency");
- assertEquals("null,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 457");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY, COLDSTANDBY, DEMOTE);
+ assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 455");
- se = st.getEndingState("locked", "disabled", "dependency", "null", "promote");
- assertEquals("coldstandby,locked,disabled,dependency,StandbyStatusException", makeString(se));
+ logger.info("??? StateTransition testcase 458");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY, COLDSTANDBY, UNLOCK);
+ assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 456");
- se = st.getEndingState("locked", "disabled", "dependency", "null", "demote");
- assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 459");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY, COLDSTANDBY, DISABLE_FAILED);
+ assertEquals("coldstandby,locked,disabled,dependency,failed,", makeString(se));
- logger.info("??? StateTransition testcase 457");
- se = st.getEndingState("locked", "disabled", "dependency", "coldstandby", "demote");
- assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 460");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY, COLDSTANDBY, ENABLE_NOT_FAILED);
+ assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 458");
- se = st.getEndingState("locked", "disabled", "dependency", "coldstandby", "unlock");
- assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 461");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY, COLDSTANDBY, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 459");
- se = st.getEndingState("locked", "disabled", "dependency", "coldstandby", "disableFailed");
- assertEquals("coldstandby,locked,disabled,dependency,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 462");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY, COLDSTANDBY, ENABLE_NO_DEPENDENCY);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 460");
- se = st.getEndingState("locked", "disabled", "dependency", "coldstandby", "enableNotFailed");
- assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 463");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY, COLDSTANDBY, PROMOTE);
+ assertEquals("coldstandby,locked,disabled,dependency,StandbyStatusException", makeString(se));
- logger.info("??? StateTransition testcase 461");
- se = st.getEndingState("locked", "disabled", "dependency", "coldstandby", "disableDependency");
- assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 464");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY, COLDSTANDBY, DEMOTE);
+ assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 462");
- se = st.getEndingState("locked", "disabled", "dependency", "coldstandby", "enableNoDependency");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 465");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY, HOTSTANDBY, DEMOTE);
+ assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 463");
- se = st.getEndingState("locked", "disabled", "dependency", "coldstandby", "promote");
- assertEquals("coldstandby,locked,disabled,dependency,StandbyStatusException", makeString(se));
+ logger.info("??? StateTransition testcase 466");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY, HOTSTANDBY, UNLOCK);
+ assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 464");
- se = st.getEndingState("locked", "disabled", "dependency", "coldstandby", "demote");
- assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 467");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY, HOTSTANDBY, DISABLE_FAILED);
+ assertEquals("coldstandby,locked,disabled,dependency,failed,", makeString(se));
- logger.info("??? StateTransition testcase 465");
- se = st.getEndingState("locked", "disabled", "dependency", "hotstandby", "demote");
- assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 468");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY, HOTSTANDBY, ENABLE_NOT_FAILED);
+ assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 466");
- se = st.getEndingState("locked", "disabled", "dependency", "hotstandby", "unlock");
- assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 469");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY, HOTSTANDBY, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 467");
- se = st.getEndingState("locked", "disabled", "dependency", "hotstandby", "disableFailed");
- assertEquals("coldstandby,locked,disabled,dependency,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 470");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY, HOTSTANDBY, ENABLE_NO_DEPENDENCY);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 468");
- se = st.getEndingState("locked", "disabled", "dependency", "hotstandby", "enableNotFailed");
- assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 471");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY, HOTSTANDBY, PROMOTE);
+ assertEquals("coldstandby,locked,disabled,dependency,StandbyStatusException", makeString(se));
- logger.info("??? StateTransition testcase 469");
- se = st.getEndingState("locked", "disabled", "dependency", "hotstandby", "disableDependency");
- assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 472");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY, HOTSTANDBY, DEMOTE);
+ assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 470");
- se = st.getEndingState("locked", "disabled", "dependency", "hotstandby", "enableNoDependency");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 473");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY, PROVIDINGSERVICE, DEMOTE);
+ assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 471");
- se = st.getEndingState("locked", "disabled", "dependency", "hotstandby", "promote");
- assertEquals("coldstandby,locked,disabled,dependency,StandbyStatusException", makeString(se));
+ logger.info("??? StateTransition testcase 474");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY, PROVIDINGSERVICE, UNLOCK);
+ assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 472");
- se = st.getEndingState("locked", "disabled", "dependency", "hotstandby", "demote");
- assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 475");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY, PROVIDINGSERVICE, DISABLE_FAILED);
+ assertEquals("coldstandby,locked,disabled,dependency,failed,", makeString(se));
- logger.info("??? StateTransition testcase 473");
- se = st.getEndingState("locked", "disabled", "dependency", "providingservice", "demote");
- assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 476");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY, PROVIDINGSERVICE, ENABLE_NOT_FAILED);
+ assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 474");
- se = st.getEndingState("locked", "disabled", "dependency", "providingservice", "unlock");
- assertEquals("coldstandby,unlocked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 477");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY, PROVIDINGSERVICE, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 475");
- se = st.getEndingState("locked", "disabled", "dependency", "providingservice", "disableFailed");
- assertEquals("coldstandby,locked,disabled,dependency,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 478");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY, PROVIDINGSERVICE, ENABLE_NO_DEPENDENCY);
+ assertEquals("coldstandby,locked,enabled,null,", makeString(se));
- logger.info("??? StateTransition testcase 476");
- se = st.getEndingState("locked", "disabled", "dependency", "providingservice", "enableNotFailed");
- assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 479");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY, PROVIDINGSERVICE, PROMOTE);
+ assertEquals("coldstandby,locked,disabled,dependency,StandbyStatusException", makeString(se));
- logger.info("??? StateTransition testcase 477");
- se = st.getEndingState("locked", "disabled", "dependency", "providingservice", "disableDependency");
- assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 480");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY, PROVIDINGSERVICE, DEMOTE);
+ assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 478");
- se = st.getEndingState("locked", "disabled", "dependency", "providingservice", "enableNoDependency");
- assertEquals("coldstandby,locked,enabled,null,", makeString(se));
+ logger.info("??? StateTransition testcase 481");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY_FAILED, "null", DEMOTE);
+ assertEquals("coldstandby,locked,disabled,dependency,failed,", makeString(se));
- logger.info("??? StateTransition testcase 479");
- se = st.getEndingState("locked", "disabled", "dependency", "providingservice", "promote");
- assertEquals("coldstandby,locked,disabled,dependency,StandbyStatusException", makeString(se));
+ logger.info("??? StateTransition testcase 482");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY_FAILED, "null", UNLOCK);
+ assertEquals("null,unlocked,disabled,dependency,failed,", makeString(se));
- logger.info("??? StateTransition testcase 480");
- se = st.getEndingState("locked", "disabled", "dependency", "providingservice", "demote");
- assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 483");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY_FAILED, "null", DISABLE_FAILED);
+ assertEquals("null,locked,disabled,dependency,failed,", makeString(se));
- logger.info("??? StateTransition testcase 481");
- se = st.getEndingState("locked", "disabled", "dependency,failed", "null", "demote");
- assertEquals("coldstandby,locked,disabled,dependency,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 484");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY_FAILED, "null", ENABLE_NOT_FAILED);
+ assertEquals("null,locked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 482");
- se = st.getEndingState("locked", "disabled", "dependency,failed", "null", "unlock");
- assertEquals("null,unlocked,disabled,dependency,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 485");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY_FAILED, "null", DISABLE_DEPENDENCY);
+ assertEquals("null,locked,disabled,dependency,failed,", makeString(se));
- logger.info("??? StateTransition testcase 483");
- se = st.getEndingState("locked", "disabled", "dependency,failed", "null", "disableFailed");
- assertEquals("null,locked,disabled,dependency,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 486");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY_FAILED, "null", ENABLE_NO_DEPENDENCY);
+ assertEquals("null,locked,disabled,failed,", makeString(se));
- logger.info("??? StateTransition testcase 484");
- se = st.getEndingState("locked", "disabled", "dependency,failed", "null", "enableNotFailed");
- assertEquals("null,locked,disabled,dependency,", makeString(se));
+ logger.info("??? StateTransition testcase 487");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY_FAILED, "null", PROMOTE);
+ assertEquals("coldstandby,locked,disabled,dependency,failed,StandbyStatusException", makeString(se));
- logger.info("??? StateTransition testcase 485");
- se = st.getEndingState("locked", "disabled", "dependency,failed", "null", "disableDependency");
- assertEquals("null,locked,disabled,dependency,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 488");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY_FAILED, "null", DEMOTE);
+ assertEquals("coldstandby,locked,disabled,dependency,failed,", makeString(se));
- logger.info("??? StateTransition testcase 486");
- se = st.getEndingState("locked", "disabled", "dependency,failed", "null", "enableNoDependency");
- assertEquals("null,locked,disabled,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 489");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY_FAILED, COLDSTANDBY, DEMOTE);
+ assertEquals("coldstandby,locked,disabled,dependency,failed,", makeString(se));
- logger.info("??? StateTransition testcase 487");
- se = st.getEndingState("locked", "disabled", "dependency,failed", "null", "promote");
- assertEquals("coldstandby,locked,disabled,dependency,failed,StandbyStatusException", makeString(se));
+ logger.info("??? StateTransition testcase 490");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY_FAILED, COLDSTANDBY, UNLOCK);
+ assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
- logger.info("??? StateTransition testcase 488");
- se = st.getEndingState("locked", "disabled", "dependency,failed", "null", "demote");
- assertEquals("coldstandby,locked,disabled,dependency,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 491");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY_FAILED, COLDSTANDBY, DISABLE_FAILED);
+ assertEquals("coldstandby,locked,disabled,dependency,failed,", makeString(se));
- logger.info("??? StateTransition testcase 489");
- se = st.getEndingState("locked", "disabled", "dependency,failed", "coldstandby", "demote");
- assertEquals("coldstandby,locked,disabled,dependency,failed,", makeString(se));
+ logger.info("??? StateTransition testcase 492");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY_FAILED, COLDSTANDBY, ENABLE_NOT_FAILED);
+ assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
- logger.info("??? StateTransition testcase 490");
- se = st.getEndingState("locked", "disabled", "dependency,failed", "coldstandby", "unlock");
- assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
-
- logger.info("??? StateTransition testcase 491");
- se = st.getEndingState("locked", "disabled", "dependency,failed", "coldstandby", "disableFailed");
- assertEquals("coldstandby,locked,disabled,dependency,failed,", makeString(se));
-
- logger.info("??? StateTransition testcase 492");
- se = st.getEndingState("locked", "disabled", "dependency,failed", "coldstandby", "enableNotFailed");
- assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
-
- logger.info("??? StateTransition testcase 493");
- se = st.getEndingState("locked", "disabled", "dependency,failed", "coldstandby", "disableDependency");
- assertEquals("coldstandby,locked,disabled,dependency,failed,", makeString(se));
-
- logger.info("??? StateTransition testcase 494");
- se = st.getEndingState("locked", "disabled", "dependency,failed", "coldstandby", "enableNoDependency");
- assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
-
- logger.info("??? StateTransition testcase 495");
- se = st.getEndingState("locked", "disabled", "dependency,failed", "coldstandby", "promote");
- assertEquals("coldstandby,locked,disabled,dependency,failed,StandbyStatusException", makeString(se));
-
- logger.info("??? StateTransition testcase 496");
- se = st.getEndingState("locked", "disabled", "dependency,failed", "coldstandby", "demote");
- assertEquals("coldstandby,locked,disabled,dependency,failed,", makeString(se));
-
- logger.info("??? StateTransition testcase 497");
- se = st.getEndingState("locked", "disabled", "dependency,failed", "hotstandby", "demote");
- assertEquals("coldstandby,locked,disabled,dependency,failed,", makeString(se));
-
- logger.info("??? StateTransition testcase 498");
- se = st.getEndingState("locked", "disabled", "dependency,failed", "hotstandby", "unlock");
- assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
-
- logger.info("??? StateTransition testcase 499");
- se = st.getEndingState("locked", "disabled", "dependency,failed", "hotstandby", "disableFailed");
- assertEquals("coldstandby,locked,disabled,dependency,failed,", makeString(se));
-
- logger.info("??? StateTransition testcase 500");
- se = st.getEndingState("locked", "disabled", "dependency,failed", "hotstandby", "enableNotFailed");
- assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
-
- logger.info("??? StateTransition testcase 501");
- se = st.getEndingState("locked", "disabled", "dependency,failed", "hotstandby", "disableDependency");
- assertEquals("coldstandby,locked,disabled,dependency,failed,", makeString(se));
-
- logger.info("??? StateTransition testcase 502");
- se = st.getEndingState("locked", "disabled", "dependency,failed", "hotstandby", "enableNoDependency");
- assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
-
- logger.info("??? StateTransition testcase 503");
- se = st.getEndingState("locked", "disabled", "dependency,failed", "hotstandby", "promote");
- assertEquals("coldstandby,locked,disabled,dependency,failed,StandbyStatusException", makeString(se));
-
- logger.info("??? StateTransition testcase 504");
- se = st.getEndingState("locked", "disabled", "dependency,failed", "hotstandby", "demote");
- assertEquals("coldstandby,locked,disabled,dependency,failed,", makeString(se));
-
- logger.info("??? StateTransition testcase 505");
- se = st.getEndingState("locked", "disabled", "dependency,failed", "providingservice", "demote");
- assertEquals("coldstandby,locked,disabled,dependency,failed,", makeString(se));
-
- logger.info("??? StateTransition testcase 506");
- se = st.getEndingState("locked", "disabled", "dependency,failed", "providingservice", "unlock");
- assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
-
- logger.info("??? StateTransition testcase 507");
- se = st.getEndingState("locked", "disabled", "dependency,failed", "providingservice", "disableFailed");
- assertEquals("coldstandby,locked,disabled,dependency,failed,", makeString(se));
-
- logger.info("??? StateTransition testcase 508");
- se = st.getEndingState("locked", "disabled", "dependency,failed", "providingservice",
- "enableNotFailed");
- assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
-
- logger.info("??? StateTransition testcase 509");
- se = st.getEndingState("locked", "disabled", "dependency,failed", "providingservice",
- "disableDependency");
- assertEquals("coldstandby,locked,disabled,dependency,failed,", makeString(se));
-
- logger.info("??? StateTransition testcase 510");
- se = st.getEndingState("locked", "disabled", "dependency,failed", "providingservice",
- "enableNoDependency");
- assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
-
- logger.info("??? StateTransition testcase 511");
- se = st.getEndingState("locked", "disabled", "dependency,failed", "providingservice", "promote");
- assertEquals("coldstandby,locked,disabled,dependency,failed,StandbyStatusException", makeString(se));
-
- logger.info("??? StateTransition testcase 512");
- se = st.getEndingState("locked", "disabled", "dependency,failed", "providingservice", "demote");
- assertEquals("coldstandby,locked,disabled,dependency,failed,", makeString(se));
-
- } catch (Exception ex) {
- logger.error("EndingState NOT found");
- throw new Exception("EndingState NOT found. " + ex);
- }
-
- } catch (Exception ex) {
- logger.error("Exception: {}" + ex.toString());
- throw new Exception("Failure getting ending state. " + ex);
- }
+ logger.info("??? StateTransition testcase 493");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY_FAILED, COLDSTANDBY, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,locked,disabled,dependency,failed,", makeString(se));
+
+ logger.info("??? StateTransition testcase 494");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY_FAILED, COLDSTANDBY, ENABLE_NO_DEPENDENCY);
+ assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
+
+ logger.info("??? StateTransition testcase 495");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY_FAILED, COLDSTANDBY, PROMOTE);
+ assertEquals("coldstandby,locked,disabled,dependency,failed,StandbyStatusException", makeString(se));
+
+ logger.info("??? StateTransition testcase 496");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY_FAILED, COLDSTANDBY, DEMOTE);
+ assertEquals("coldstandby,locked,disabled,dependency,failed,", makeString(se));
+
+ logger.info("??? StateTransition testcase 497");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY_FAILED, HOTSTANDBY, DEMOTE);
+ assertEquals("coldstandby,locked,disabled,dependency,failed,", makeString(se));
+
+ logger.info("??? StateTransition testcase 498");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY_FAILED, HOTSTANDBY, UNLOCK);
+ assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
+
+ logger.info("??? StateTransition testcase 499");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY_FAILED, HOTSTANDBY, DISABLE_FAILED);
+ assertEquals("coldstandby,locked,disabled,dependency,failed,", makeString(se));
+
+ logger.info("??? StateTransition testcase 500");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY_FAILED, HOTSTANDBY, ENABLE_NOT_FAILED);
+ assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
+
+ logger.info("??? StateTransition testcase 501");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY_FAILED, HOTSTANDBY, DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,locked,disabled,dependency,failed,", makeString(se));
+
+ logger.info("??? StateTransition testcase 502");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY_FAILED, HOTSTANDBY, ENABLE_NO_DEPENDENCY);
+ assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
+
+ logger.info("??? StateTransition testcase 503");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY_FAILED, HOTSTANDBY, PROMOTE);
+ assertEquals("coldstandby,locked,disabled,dependency,failed,StandbyStatusException", makeString(se));
+
+ logger.info("??? StateTransition testcase 504");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY_FAILED, HOTSTANDBY, DEMOTE);
+ assertEquals("coldstandby,locked,disabled,dependency,failed,", makeString(se));
+
+ logger.info("??? StateTransition testcase 505");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY_FAILED, PROVIDINGSERVICE, DEMOTE);
+ assertEquals("coldstandby,locked,disabled,dependency,failed,", makeString(se));
+
+ logger.info("??? StateTransition testcase 506");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY_FAILED, PROVIDINGSERVICE, UNLOCK);
+ assertEquals("coldstandby,unlocked,disabled,dependency,failed,", makeString(se));
+
+ logger.info("??? StateTransition testcase 507");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY_FAILED, PROVIDINGSERVICE, DISABLE_FAILED);
+ assertEquals("coldstandby,locked,disabled,dependency,failed,", makeString(se));
+
+ logger.info("??? StateTransition testcase 508");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY_FAILED, PROVIDINGSERVICE,
+ ENABLE_NOT_FAILED);
+ assertEquals("coldstandby,locked,disabled,dependency,", makeString(se));
+
+ logger.info("??? StateTransition testcase 509");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY_FAILED, PROVIDINGSERVICE,
+ DISABLE_DEPENDENCY);
+ assertEquals("coldstandby,locked,disabled,dependency,failed,", makeString(se));
+
+ logger.info("??? StateTransition testcase 510");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY_FAILED, PROVIDINGSERVICE,
+ ENABLE_NO_DEPENDENCY);
+ assertEquals("coldstandby,locked,disabled,failed,", makeString(se));
+
+ logger.info("??? StateTransition testcase 511");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY_FAILED, PROVIDINGSERVICE, PROMOTE);
+ assertEquals("coldstandby,locked,disabled,dependency,failed,StandbyStatusException", makeString(se));
+
+ logger.info("??? StateTransition testcase 512");
+ se = st.getEndingState(LOCKED, DISABLED, DEPENDENCY_FAILED, PROVIDINGSERVICE, DEMOTE);
+ assertEquals("coldstandby,locked,disabled,dependency,failed,", makeString(se));
logger.info("\n\nStateTransitionTest: Exit\n\n");
}
/**
* Converts a state element to a comma-separated string.
- *
+ *
* @param se element to be converted
* @return a string representing the element
*/
diff --git a/integrity-monitor/src/test/java/org/onap/policy/common/im/exceptions/EntityRetrievalExceptionTest.java b/integrity-monitor/src/test/java/org/onap/policy/common/im/exceptions/EntityRetrievalExceptionTest.java
index 48ec3b86..3d7ae636 100644
--- a/integrity-monitor/src/test/java/org/onap/policy/common/im/exceptions/EntityRetrievalExceptionTest.java
+++ b/integrity-monitor/src/test/java/org/onap/policy/common/im/exceptions/EntityRetrievalExceptionTest.java
@@ -3,13 +3,14 @@
* Integrity Monitor
* ================================================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -28,7 +29,7 @@ import org.onap.policy.common.utils.test.ExceptionsTester;
public class EntityRetrievalExceptionTest extends ExceptionsTester {
@Test
- public void testEntityRetrievalException() throws Exception {
+ public void testEntityRetrievalException() {
assertEquals(1, test(EntityRetrievalException.class));
}