### Question:
LoopFlipQuery extends TransformationQuery { @Override public boolean hasNextTransformation() { return !candidateList.isEmpty(); } LoopFlipQuery(InputProgram inputProgram); @Override Transformation query(); @Override boolean hasNextTransformation();  }### Answer:
@Test public void hasNextTransformation() throws Exception { TransformationQuery query = new LoopFlipQuery(inputProgram); for(int i = 0; i < 9; i++) { assertTrue(query.hasNextTransformation()); query.query(); } assertTrue(!query.hasNextTransformation()); }