private QueryResult query(String testDescription, boolean fuzzy) throws IOException,
InterruptedException, IncompatibleConnectionException,
GeneralSecurityException {
FindSCU main = new FindSCU();
main.getAAssociateRQ().setCalledAET(aeTitle);
main.getRemoteConnection().setHostname(host);
main.getRemoteConnection().setPort(port);
ExecutorService executorService = Executors.newSingleThreadExecutor();
ScheduledExecutorService scheduledExecutorService = Executors
.newSingleThreadScheduledExecutor();
main.getDevice().setExecutor(executorService);
main.getDevice().setScheduledExecutor(scheduledExecutorService);
EnumSet<QueryOption> queryOptions = EnumSet.noneOf(QueryOption.class);
if (fuzzy) queryOptions.add(QueryOption.FUZZY);
main.setInformationModel(InformationModel.StudyRoot, IVR_LE_FIRST,queryOptions);
main.getKeys().addAll(queryatts);
long timeStart = System.currentTimeMillis();
try {
main.open();
main.query(getDimseRSPHandler(main.getAssociation().nextMessageID()));
} finally {
main.close(); // is waiting for all the responsens to be complete
executorService.shutdown();
scheduledExecutorService.shutdown();
}