def test_laser_beam_update(laser_generator, min_laser_beam, max_laser_beam, not_close, less_or_equal, art_warning):
    """
    Test if laser beam update is conducted correctly.
    """
    try:
        for _ in range(5):
            random_laser = laser_generator.random()

            arr1 = random_laser.to_numpy()
            arr2 = laser_generator.update_params(random_laser).to_numpy()
            np.testing.assert_array_compare(not_close, arr1, arr2)
            np.testing.assert_array_compare(less_or_equal, arr2, max_laser_beam.to_numpy())
            np.testing.assert_array_compare(less_or_equal, min_laser_beam.to_numpy(), arr2)
            np.testing.assert_array_compare(less_or_equal, np.zeros_like(arr1), arr1)
    except ARTTestException as _e:
        art_warning(_e)

    Test if laser beam update is conducted correctly.
    
tests/attacks/evasion/test_laser_attack.py