BasicConnectorFactory implements ConnectorFactory { @Override public synchronized void reloadData() throws OwlapiDriverException { ensureOpen(); if (connector == null) { return; } connector.reloadData(); } BasicConnectorFactory(); @Override synchronized AbstractConnector getConnector(DriverConfiguration configuration); @Override boolean isOpen(); @Override synchronized void reloadData(); @Override synchronized void close();  }
@Test public void reloadDataDoesNothingWhenConnectorDoesNotYetExist() throws Exception { final Field connectorField = BasicConnectorFactory.class.getDeclaredField("connector"); connectorField.setAccessible(true); assertNull(connectorField.get(factory)); factory.reloadData(); assertNull(connectorField.get(factory)); }