@Test( expected = IllegalStateException.class )
public void testRegisterActiveWorkflow() throws Exception
{

    environmentManager.registerActiveWorkflow( environment, checkWorkflow );
    verify( activeWorkflows ).put( TestHelper.ENV_ID, checkWorkflow );
    doReturn( checkWorkflow ).when( activeWorkflows ).get( TestHelper.ENV_ID );
    environmentManager.registerActiveWorkflow( environment, checkWorkflow );
}