### Question:
EmptyReturnMetadataHandler extends StubMapping implements InternalStubMapping { @Override public boolean matches(Frame frame) { if (frame.message instanceof Query) { Query query = (Query) frame.message; String frameQueryStr = query.query; return queryStr.equalsIgnoreCase(frameQueryStr); } return false; } EmptyReturnMetadataHandler(String matchingQuery); @Override boolean matches(Frame frame); @Override List<Action> getActions(AbstractNode node, Frame frame);  }### Answer:
@Test public void shouldMatch() { for (String s : sampleStrings) { assertThat(new EmptyReturnMetadataHandler(s).matches(null, queryFrame(s))).isTrue(); } }
@Test public void shouldNotMatch() { assertThat(handler.matches(null, queryFrame("SELECT foo FROM bar"))).isFalse(); assertThat(handler.matches(null, FrameUtils.wrapRequest(new Startup()))).isFalse(); assertThat(handler.matches(null, FrameUtils.wrapRequest(Options.INSTANCE))).isFalse(); }