return {
  rubiconMarket,
  testCoin,
  cToken,
  owner,
  otherAccount,
  testStableCoin,
  cTokenStable,
  Position,
  priceOracle, // add this
  comptroller, // add this
};
describe("Liquidated position bug", function () {
  it("POC", async function () {
    const { owner, testCoin, testStableCoin, cToken, cTokenStable, Position, otherAccount, priceOracle, comptroller } = await loadFixture(
      deployPoolsUtilityFixture
    ); // I really went all out on this didn't I?

    // assert that, initially, the Position contract holds no cTokens
    expect(await cToken.balanceOf(Position.address)).to.be.eq(0);

    // let's first open a long position with 2x margin
    await Position.connect(owner).buyAllAmountWithLeverage(
      testCoin.address,
      testStableCoin.address,
      TEST_AMOUNT,
      x2_332
    );

    // now drop the price to half
    await priceOracle.addCtoken(cToken.address, parseUnits("0.5", 18));

    // caveat: gotta set the close factor and liq incentive first
    await comptroller.connect(owner)._setCloseFactor(parseUnits("0.5"));
    await comptroller.connect(owner)._setLiquidationIncentive(parseUnits("0.1"));

    // now fund otherAccount with some testStableCoin, and liquidate
    await testStableCoin.connect(otherAccount).faucet();
    await testStableCoin.connect(otherAccount).approve(cTokenStable.address, parseUnits("100000")); // excess approval is fine
    await cTokenStable.connect(otherAccount).liquidateBorrow(Position.address, parseUnits("12", 6), cToken.address); // liquidated!

    // now attempt to close the position, but fail
    await expect(Position.connect(owner).closePosition(1)).to.be.reverted;

    // however, the position contract still have cToken, but also positive debt
    expect(await cToken.balanceOf(Position.address)).to.be.gt(0);
    expect(await cTokenStable.borrowBalanceStored(Position.address)).to.be.gt(0);
  });
});
