contract MockWeightedPool2Tokens is WeightedPool2Tokens, MockPoolPriceOracle, MockWeightedOracleMath {
    using WeightedPool2TokensMiscData for bytes32;

    struct MiscData {
        int256 logInvariant;
        int256 logTotalSupply;
        uint256 oracleSampleCreationTimestamp;
        uint256 oracleIndex;
        bool oracleEnabled;
        uint256 swapFeePercentage;
    }

    constructor(NewPoolParams memory params) WeightedPool2Tokens(params) {}

    function mockOracleDisabled() external {
        _setOracleEnabled(false);
    }

    function mockOracleIndex(uint256 index) external {
        _miscData = _miscData.setOracleIndex(index);
    }

    function mockMiscData(MiscData memory miscData) external {
        _miscData = encode(miscData);
    }

    /**
     * @dev Encodes a misc data object into a bytes32
     */
    function encode(MiscData memory _data) private pure returns (bytes32 data) {
        data = data.setSwapFeePercentage(_data.swapFeePercentage);
        data = data.setOracleEnabled(_data.oracleEnabled);
        data = data.setOracleIndex(_data.oracleIndex);
        data = data.setOracleSampleCreationTimestamp(_data.oracleSampleCreationTimestamp);
        data = data.setLogTotalSupply(_data.logTotalSupply);
        data = data.setLogInvariant(_data.logInvariant);
    }
}
function encode(MiscData memory _data) private pure returns (bytes32 data) {
        data = data.setSwapFeePercentage(_data.swapFeePercentage);
        data = data.setOracleEnabled(_data.oracleEnabled);
        data = data.setOracleIndex(_data.oracleIndex);
        data = data.setOracleSampleCreationTimestamp(_data.oracleSampleCreationTimestamp);
        data = data.setLogTotalSupply(_data.logTotalSupply);
        data = data.setLogInvariant(_data.logInvariant);
    }
/**
 * @dev Encodes a misc data object into a bytes32
 */