private ConnectorCoordinatorImpl createMockConnector(String name,
String connectorInstancePrototype)
throws JSONException, InstantiatorException, ConnectorNotFoundException,
ConnectorExistsException, ConnectorTypeNotFoundException {
// Inject our test ConnectorType into the TypeMap.
MockConnectorType type = new MockConnectorType(name);
TypeInfo typeInfo = new TypeInfo(type.toString(), type, null, null);
getTypeMap().addTypeInfo(typeInfo);
final ConnectorCoordinatorImpl instance = newCoordinator(name);
assertFalse(instance.exists());
Configuration config = new Configuration(type.toString(),
new HashMap<String, String>(), connectorInstancePrototype);
updateConnectorTest(instance, config, false);
return instance;
}