Finalized unit test for autoleave plugin