function test_simulate()
    d = 2
    lims = repeat([-1.0 1.0], d, 1)
    cdist = UniformContext(lims)
    rdist = GaussianRewards([x -> x[1], x -> -x[1]], 1.0)
    policy = FixedPolicy(1)
    traj = Trajectory(d)
    simulate!(10, traj, cdist, rdist, policy; verbose=false)
    simulate!(10, traj, cdist, rdist, policy; verbose=false)
    @test traj.t == 20
    @test size(traj.X) == (20, d)
    @test traj.a == fill(1, 20)

    # Test matrix extension
    # traj = Trajectory(d)
    # ContextualBandits.add_memory!(traj, 10)
    # X = rand(10, d)
    # a = ones(Int, 10)
    # r = rand(10)
    # total_regret = zeros(10)
    # ContextualBandits.extend!(traj, X, a, r, total_regret)
    # @test traj.X == X
    # @test traj.r == r
    # @test traj.a == a
    # @test traj.total_regret == total_regret
    # @test traj.t == 10
end

test_simulate()