### Question:
ShardingQueryResultContext extends QueryResultContext { @Override public void addCommandComplete(byte[] commandComplete) { throw new RuntimeException("Called addCommandComplete in ShardingQueryResultContext"); } ShardingQueryResultContext(); @Override void writeBytes(byte[] src); @Override void addColumn(byte[] column); @Override void addRow(byte[] row); @Override void addRowDescription(byte[] rowDescription); @Override void addCommandComplete(byte[] commandComplete); @Override void addReadyForQuery(byte[] readyForQuery); @Override void sendAndFlush2Client(); int getRowBufSize(); int getColumBufSize(); void resetColumnBuf(); void resetRowBuf(); int getShardingIndex(); void setShardingIndex(int shardingIndex); public ArrayList<byte[]> shardingBuf; final ResponseClassifier responseClassifier; }### Answer:
@Test(expectedExceptions = RuntimeException.class, expectedExceptionsMessageRegExp = "Called .* in ShardingQueryResultContext") public void testAddCommandComplete() throws Exception { ShardingQueryResultContext sqrc = new ShardingQueryResultContext(); sqrc.addCommandComplete(new byte[0]); }