Tests optimization.