Bug fixes and JUnit tests for Value Set Query