update tests, change exception handling for unsupported queries
javadoc on query method