Added a unit tests for OnEntry