Create tests for ContextFactory