Added very rigorous tests for createContext