You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: arithmetic_brownian_motion.rs
    path of file: ./repos/RustQuant/src/stochastics
    
    the code of the file until where you have to start completion: // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// RustQuant: A Rust library for quantitative finance tools.
// Copyright (C) 2023 https://github.com/avhz
// Dual licensed under Apache 2.0 and MIT.
// See:
//      - LICENSE-APACHE.md
//      - LICENSE-MIT.md
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

use crate::models::arithmetic_brownian_motion::ArithmeticBrownianMotion;
use crate::stochastics::process::StochasticProcess;

impl StochasticProcess for ArithmeticBrownianMotion {
    fn drift(&self, _x: f64, t: f64) -> f64 {
        // mu dt
        self.mu.0(t)
    
    
    fn test_arithmetic_brownian_motion() {
        let abm = ArithmeticBrownianMotion::new(0.05, 0.9);

        let output = abm.euler_maruyama(10.0, 0.0, 0.5, 125, 1000, false);

        // let file1 = "./images/ABM1.png";
        // plot_vector((&output.trajectories[0]).clone(), file1).unwrap();
        // let file2 = "./images/ABM2.png";
        // plot_vector((&output.trajectories[1]).clone(), file2)

        // Test the distribution of the final values.
        let X_T: Vec<f64> = output
            .paths
            .iter()
            .filter_map(|v| v.last().copied())
            .collect();

        let E_XT = X_T.mean();
        let V_XT = X_T.variance();
        // E[X_T] = X_0 + mu * T
        assert_approx_equal!(E_XT, 10.0 + 0.05 * 0.5, 0.1);
        // V[X_T] = sigma^2 * T
        assert_approx_equal!(V_XT, 0.9 * 0.9 * 0.5, 0.1);
    }