@Test
public void shouldHandleQueryLocal() {

  // querying the local table should return node info.
  List<Action> node0Actions =
      handler.getActions(node0, queryFrame("SELECT * FROM system.local WHERE key='local'"));
  assertThat(node0Actions).hasSize(1);
  Action node0Action = node0Actions.get(0);
  assertThat(node0Action).isInstanceOf(MessageResponseAction.class);
  Message node0Message = ((MessageResponseAction) node0Action).getMessage();
  assertThat(node0Message)
      .isRows()
      .hasRows(1)
      .hasColumnSpecs(17)
      .hasColumn(0, 0, "local")
      .hasColumn(0, 1, "COMPLETED")
      .hasColumn(0, 2, ((InetSocketAddress) node0.getAddress()).getAddress())
      .hasColumn(0, 3, ((InetSocketAddress) node0.getAddress()).getPort())
      .hasColumn(0, 4, ((InetSocketAddress) node0.getAddress()).getAddress())
      .hasColumn(0, 5, ((InetSocketAddress) node0.getAddress()).getPort())
      .hasColumn(0, 6, cluster.getName())
      .hasColumn(0, 7, "3.2.0")
      .hasColumn(0, 8, node0.getDataCenter().getName())
      .hasColumn(0, 9, ((InetSocketAddress) node0.getAddress()).getAddress())
      .hasColumn(0, 10, ((InetSocketAddress) node0.getAddress()).getPort())
      .hasColumn(0, 11, "org.apache.cassandra.dht.Murmur3Partitioner")
      .hasColumn(0, 12, "rack1")
      .hasColumn(0, 13, "3.0.12")
      .hasColumn(0, 14, Collections.singleton("0"))
      .hasColumn(0, 15, node0.getHostId())
      .hasColumn(0, 16, PeerMetadataHandler.schemaVersion);
}