BasicConnectorFactory implements ConnectorFactory { @Override public synchronized AbstractConnector getConnector(DriverConfiguration configuration) throws OwlapiDriverException { ensureOpen(); if (connector == null) { initConnector(configuration); } return connector; } BasicConnectorFactory(); @Override synchronized AbstractConnector getConnector(DriverConfiguration configuration); @Override boolean isOpen(); @Override synchronized void reloadData(); @Override synchronized void close();  }
@Test public void getConnectorReturnsTheSameCentralConnectorForAllCalls() throws Exception { final Connector connectorOne = factory.getConnector(new DriverConfiguration(storageProperties)); assertNotNull(connectorOne); final Connector connectorTwo = factory.getConnector(new DriverConfiguration(storageProperties)); assertNotNull(connectorTwo); assertSame(connectorOne, connectorTwo); }