fix a bug in the assertion timeout
fix style
avoid using abstractions in a lower-level test
improve testability and coverage on enter method
improve testing and test coverage