@Test
public void testUpdate() throws Exception
{

    doReturn( environment ).when( environmentService ).merge( environment );
    environmentManager.update( environment );
    verify( environmentService, atLeastOnce() ).merge( environment );
    //-----
    BazaarEnvironment bzrEnvironment = mock( BazaarEnvironment.class );
    reset( environmentService );
    environmentManager.update( bzrEnvironment );
    verify( environmentService, never() ).merge( environment );
}