updated unit test for beforeSystem