### Question:
BoundNode extends AbstractNode<BoundCluster, BoundDataCenter> implements BoundTopic<NodeConnectionReport, NodeQueryLogReport> { @Override @JsonIgnore public NodeQueryLogReport getLogs() { ClusterQueryLogReport clusterQueryLogReportReport = new ClusterQueryLogReport(cluster.getId()); return clusterQueryLogReportReport.addNode(this, this.activityLog.getLogs()); } BoundNode(
      SocketAddress address,
      NodeSpec delegate,
      Map<String, Object> peerInfo,
      BoundCluster cluster,
      BoundDataCenter parent,
      Server server,
      Timer timer,
      Channel channel,
      boolean activityLogging); @Override Long getActiveConnections(); @Override CompletionStage<Void> acceptConnectionsAsync(); @Override @JsonIgnore NodeQueryLogReport getLogs(); @Override @JsonIgnore NodeQueryLogReport getLogs(boolean primed); @Override void clearLogs(); @Override void registerQueryListener(
      QueryListener queryListener, boolean after, Predicate<QueryLog> filter); @Override CompletionStage<Void> rejectConnectionsAsync(int after, RejectScope scope); @Override StubStore getStubStore(); @Override int clearPrimes(boolean nested); @Override CompletionStage<BoundCluster> unregisterAsync(); int clearPrimes(); @Override NodeConnectionReport getConnections(); @Override CompletionStage<NodeConnectionReport> closeConnectionsAsync(CloseType closeType); @Override NodeConnectionReport pauseRead(); @Override NodeConnectionReport resumeRead(); @Override CompletionStage<NodeConnectionReport> closeConnectionAsync(
      SocketAddress connection, CloseType type); @Override Collection<BoundNode> getNodes(); @Override Server getServer(); @Override @JsonIgnore FrameCodecWrapper getFrameCodec();  }### Answer:
@Test public void shouldStoreActivityLogIfEnabled() { Frame request1 = FrameUtils.wrapRequest(new Query("use myks")); QueryOptions options = new QueryOptions( ProtocolConstants.ConsistencyLevel.QUORUM, Collections.emptyList(), Collections.emptyMap(), false, -1, null, ProtocolConstants.ConsistencyLevel.SERIAL, Long.MIN_VALUE, null); Query query2 = new Query("select * from table1", options); Frame request2 = FrameUtils.wrapRequest(query2); loggedChannel.writeInbound(request1); loggedChannel.readOutbound(); loggedChannel.writeInbound(request2); loggedChannel.readOutbound(); List<QueryLog> logs = loggedNode.getLogs().getQueryLogs(); assertThat(logs.size()).isEqualTo(2); QueryLog log1 = logs.get(0); assertThat(log1.getQuery()).isEqualTo("use myks"); assertThat(log1.getConsistency()).isEqualTo(ConsistencyLevel.ONE); QueryLog log2 = logs.get(1); assertThat(log2.getQuery()).isEqualTo("select * from table1"); assertThat(log2.getConsistency()).isEqualTo(ConsistencyLevel.QUORUM); }
@Test public void shouldNotStoreActivityLogIfDisabled() { Frame request1 = FrameUtils.wrapRequest(new Query("use myks")); Query query2 = new Query("select * from table1"); Frame request2 = FrameUtils.wrapRequest(query2); channel.writeInbound(request1); channel.readOutbound(); channel.writeInbound(request2); channel.readOutbound(); assertThat(node.getLogs().getQueryLogs()).hasSize(0); }