assertEquals("Unexpected state", State.DELETED, object.getState());
}
public void testDeletionInERROREDStateAfterFailedOpenOnDesiredStateChangeToDelete() throws Exception
{
TestConfiguredObject object = new TestConfiguredObject(getName());
object.setThrowExceptionOnOpen(true);
object.open();
assertFalse("Unexpected opened", object.isOpened());
assertEquals("Unexpected state", State.ERRORED, object.getState());
object.setAttributes(Collections.<String, Object>singletonMap(Port.DESIRED_STATE, State.DELETED));
assertFalse("Unexpected opened", object.isOpened());
assertEquals("Unexpected state", State.DELETED, object.getState());
}