added unittest for portfolio