PostgreSQLUnsupportedCommandExecutor implements CommandExecutor { @Override public Collection<DatabasePacket<?>> execute() { return Collections.singletonList(new PostgreSQLErrorResponsePacket()); }  @Override Collection<DatabasePacket<?>> execute();  }
@Test public void assertExecute() { PostgreSQLUnsupportedCommandExecutor commandExecutor = new PostgreSQLUnsupportedCommandExecutor(); Collection<DatabasePacket<?>> actual = commandExecutor.execute(); assertThat(actual.size(), is(1)); assertThat(actual.iterator().next(), instanceOf(PostgreSQLErrorResponsePacket.class)); }