@Override
    public boolean equals(CostModel otherModel) {
        boolean equality = false;
        if (this.getClass().equals(otherModel.getClass())) {
            equality = ((FixedTransactionCostModel) otherModel).feePerTrade == this.feePerTrade;
        }
        return equality;
    }
@Test
    public void testEquality() {
        double randomFee = RANDOM.nextDouble();
        FixedTransactionCostModel model = new FixedTransactionCostModel(randomFee);
        CostModel modelSame = new FixedTransactionCostModel(randomFee);
        CostModel modelOther = new LinearTransactionCostModel(randomFee);
        boolean equality = model.equals(modelSame);
        boolean inequality = model.equals(modelOther);

        assertTrue(equality);
        assertFalse(inequality);
    }