Some unit tests and setup for context tests