unit tests for require with context change