### Question:
PGDummyQueryResultContext extends PGQueryResultContext { @Override public void sendAndFlush2Client() { throw new RuntimeException("Called sendAndFlush2Client in PGDummyQueryResultContext"); } PGDummyQueryResultContext(); @Override void writeBytes(byte[] src); @Override void sendAndFlush2Client();  }### Answer:
@Test(expectedExceptions = RuntimeException.class, expectedExceptionsMessageRegExp = "Called .* in PGDummyQueryResultContext") public void testSendAndFlush2Client() throws Exception { PGDummyQueryResultContext dummyQueryResultContext = new PGDummyQueryResultContext(); dummyQueryResultContext.sendAndFlush2Client(); }