Properties props = new Properties();
props.put(Context.GSA_FEED_HOST_PROPERTY_KEY, "fubar");
PropertiesUtils.storeToFile(props, propFile, "Initial Props");
Context.refresh();
Context context = Context.getInstance();
context.setStandaloneContext(applicationContext,
Context.DEFAULT_JUNIT_COMMON_DIR_PATH);
context.setFeeding(false);
// Inject our test ConnectorType into the TypeMap.
TypeInfo typeInfo = new TypeInfo(GDataPropertiesConnectorType.TYPE_NAME,
new GDataPropertiesConnectorType(), null, null);
getTypeMap().addTypeInfo(typeInfo);
context.start();
// Create the Connector and verify it was seeded with initial feed host.
ConnectorCoordinatorImpl instance = createGDataPropsConnector("gdata");
GDataPropertiesConnector connector =
(GDataPropertiesConnector) instance.getInstanceInfo().getConnector();
assertEquals("fubar", connector.googleFeedHost);
// Change the feed host and verify it gets updated in connector.
context.setConnectorManagerConfig("", "shme", 14,
Context.GSA_FEED_SECURE_PORT_INVALID, null);
assertEquals("shme", connector.googleFeedHost);
removeConnector(instance);
context.shutdown(true);
ConnectorTestUtils.deleteAllFiles(baseDirectory);
}