given(callDetector.callCreateInputRecord(recordFactory, inObj)).willReturn(inputRecord);
given(connectionFactory.getConnection()).willReturn(connection);
given(connection.createInteraction()).willReturn(interaction);
given(connectionFactory.getRecordFactory()).willReturn(recordFactory);
given(outputCreator.createRecord(recordFactory)).willReturn(outputRecord);
given(interaction.execute(interactionSpec, inputRecord, outputRecord)).willReturn(true);
given(callDetector.callExtractOutputData(outputRecord)).willReturn(outObj);
assertSame(outObj, query.execute(inObj));
verify(interaction).close();
verify(connection).close();