JenaAdapter implements Wrapper { JenaStatement createStatement() { beginTransactionIfNotActive(); return new JenaStatement(inferenceConnector); } JenaAdapter(StorageConnector connector, InferredStorageConnector inferenceConnector); ListHandler<SimpleListDescriptor, SimpleListValueDescriptor> simpleListHandler(); ListHandler<ReferencedListDescriptor, ReferencedListValueDescriptor> referencedListHandler(); @Override T unwrap(Class<T> cls);  }
@Test void createStatementReturnsNewJenaStatement() throws Exception { final JenaStatement result = adapter.createStatement(); assertNotNull(result); final Field execField = JenaStatement.class.getDeclaredField("executor"); execField.setAccessible(true); assertSame(inferredConnectorMock, execField.get(result)); }
@Test void createStatementStartsTransactionIfNotAlreadyActive() { adapter.createStatement(); verify(connectorMock).begin(); }