@Test
public void testCostForMovingInLevel()
        throws Exception {

    MobilityModule module = MobilityModule.createWithStandardResourceCost()
                                          .movementSpeed( 0 )
                                          .movementCost( ImmutableMap.of( LevelType.GROUND, 1d ) )
                                          .levelingCost( ImmutableMap.<LevelType, Double>of() );
    createUnit( testUnitType( "Ground Mover", module ) );
    assertEquals( 1d, module.costForMovingInLevel( LevelType.GROUND ) );
    assertEquals( Double.MAX_VALUE, module.costForMovingInLevel( LevelType.SKY ) );
    assertEquals( Double.MAX_VALUE, module.costForMovingInLevel( LevelType.SPACE ) );
    module.getGameObject().getController().die();
    ImmutableMap.Builder<LevelType, Double> builder = ImmutableMap.builder();
    for (final LevelType levelType : LevelType.values())
        builder.put( levelType, (double) levelType.ordinal() );
    module = MobilityModule.createWithStandardResourceCost()
                           .movementSpeed( 0 )
                           .movementCost( builder.build() )
                           .levelingCost( ImmutableMap.<LevelType, Double>of() );
    createUnit( testUnitType( "Everywhere Mover", module ) );
    for (final LevelType levelType : LevelType.values())
        assertEquals( (double) levelType.ordinal(), module.costForMovingInLevel( levelType ) );
}