ContextService duplicateContext implementation and test