given(connectionFactory.getConnection()).willReturn(connection);
given(connection.createInteraction()).willReturn(interaction);
given(creator.createRecord(recordFactory)).willReturn(outputRecord);
given(connectionFactory.getRecordFactory()).willReturn(recordFactory);
given(generator.createRecord(recordFactory)).willReturn(inputRecord);
given(interaction.execute(interactionSpec, inputRecord, outputRecord)).willReturn(true);
given(extractor.extractData(outputRecord)).willReturn(obj);
CciTemplate ct = new CciTemplate(connectionFactory);
ct.setOutputRecordCreator(creator);
assertEquals(obj, ct.execute(interactionSpec, generator, extractor));