### Question:
StackAdvisorResourceProvider extends ReadOnlyResourceProvider { protected Map<String, String> readUserContext(Request request) { HashMap<String, String> userContext = new HashMap<>(); if (null != getRequestProperty(request, USER_CONTEXT_OPERATION_PROPERTY)) { userContext.put(OPERATION_PROPERTY, (String) getRequestProperty(request, USER_CONTEXT_OPERATION_PROPERTY)); } if (null != getRequestProperty(request, USER_CONTEXT_OPERATION_DETAILS_PROPERTY)) { userContext.put(OPERATION_DETAILS_PROPERTY, (String) getRequestProperty(request, USER_CONTEXT_OPERATION_DETAILS_PROPERTY)); } return userContext; } protected  StackAdvisorResourceProvider(Resource.Type type, Set<String> propertyIds, Map<Type, String> keyPropertyIds,
                                         AmbariManagementController managementController); @Inject static void init(StackAdvisorHelper instance, Configuration serverConfig);  }### Answer:
@Test public void testReadUserContext() throws Exception { Request request = createMockRequest( CONFIGURATIONS_PROPERTY_ID + "site/properties/string_prop", "string", USER_CONTEXT_OPERATION_PROPERTY, "op1", USER_CONTEXT_OPERATION_DETAILS_PROPERTY, "op_det"); Map<String, String> userContext = provider.readUserContext(request); assertNotNull(userContext); assertEquals(2, userContext.size()); assertEquals("op1", userContext.get("operation")); assertEquals("op_det", userContext.get("operation_details")); }