}
@Test
public void testSetServiceState_FromInstalledToStarted() {
StateProvider mockStateProvider = createStrictMock(StateProvider.class);
ClusterDefinitionProvider mockClusterDefinitionProvider = createStrictMock(ClusterDefinitionProvider.class);
HostInfoProvider mockHostInfoProvider = createStrictMock(HostInfoProvider.class);
TestClusterDefinitionProvider testClusterDefinitionProvider = new TestClusterDefinitionProvider();
expect(mockClusterDefinitionProvider.getClusterName()).andDelegateTo(testClusterDefinitionProvider);
expect(mockClusterDefinitionProvider.getVersionId()).andDelegateTo(testClusterDefinitionProvider);
expect(mockClusterDefinitionProvider.getInputStream()).andDelegateTo(testClusterDefinitionProvider);
//checking if a service state already set
expect(mockStateProvider.getRunningState(anyObject(String.class), anyObject(String.class))).andReturn(StateProvider.State.Stopped);
//checking if a component state not set yet
expect(mockStateProvider.getRunningState(anyObject(String.class), anyObject(String.class))).andReturn(StateProvider.State.Stopped);
expect(mockStateProvider.setRunningState(anyObject(String.class), anyObject(String.class), eq(StateProvider.State.Running))).andReturn(null);