embeddedJmxTrans.addQuery(query);
final AtomicInteger exportCount = new AtomicInteger();
final AtomicInteger exportResultCount = new AtomicInteger();
OutputWriter outputWriter = new AbstractOutputWriter() {
@Override
public void write(Iterable<QueryResult> results) {
exportCount.incrementAndGet();
for (QueryResult result : results) {
exportResultCount.incrementAndGet();
}
}
};
outputWriter.setEnabled(false);
embeddedJmxTrans.getOutputWriters().add(outputWriter);
assertThat(query.getOutputWriters().size(), is(0));
assertThat(query.getEffectiveOutputWriters().size(), is(0));
}