### Question:
LoopFlipQuery extends TransformationQuery { @Override public Transformation query() throws QueryException { LoopFlip result; if(!candidateList.isEmpty()) { result = new LoopFlip(candidateList.get(0)); candidateList.remove(0); } else { System.out.println(" --- No candidate found --- "); return null; } result.setInputProgram(getInputProgram()); return result; } LoopFlipQuery(InputProgram inputProgram); @Override Transformation query(); @Override boolean hasNextTransformation();  }### Answer:
@Test public void query() throws Exception { LoopFlipQuery query = new LoopFlipQuery(inputProgram); Set<String> methods = new HashSet<>(); methods.add("loopZero"); methods.add("loopOne"); methods.add("loopTwo"); methods.add("loopThree"); methods.add("loopFour"); methods.add("loopFive"); methods.add("loopSix"); methods.add("loopSeven"); methods.add("loopEight"); methods.add("loopNine"); for(int i = 0; i < 9; i++) { LoopFlip t = (LoopFlip) query.query(); assertTrue(containsString(methods,t.methodLocationName())); } }