### Question:
LogsQuery { public boolean matches(final Log log) { return matchesAddresses(log.getLogger()) && matchesTopics(log.getTopics()); } @JsonCreator  LogsQuery(
      @JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY) @JsonProperty("address")
          final List<Address> addresses,
      @JsonDeserialize(using = TopicsDeserializer.class) @JsonProperty("topics")
          final List<List<LogTopic>> topics); boolean couldMatch(final LogsBloomFilter bloom); boolean matches(final Log log); @Override boolean equals(final Object o); @Override String toString(); @Override int hashCode();  }### Answer:
@Test public void testMatches() { final LogsQuery query = new LogsQuery( singletonList(FIRST_ADDRESS), List.of( singletonList(ERC20_TRANSFER_EVENT), List.of(FIRST_ADDRESS_TOPIC, SECOND_ADDRESS_TOPIC))); assertThat(query.matches(new Log(FIRST_ADDRESS, Bytes.EMPTY, List.of()))).isFalse(); assertThat(query.matches(new Log(FIRST_ADDRESS, Bytes.EMPTY, List.of(ERC20_TRANSFER_EVENT)))) .isFalse(); assertThat( query.matches( new Log( FIRST_ADDRESS, Bytes.EMPTY, List.of(ERC20_TRANSFER_EVENT, FIRST_ADDRESS_TOPIC)))) .isTrue(); assertThat( query.matches( new Log( FIRST_ADDRESS, Bytes.EMPTY, List.of(ERC20_TRANSFER_EVENT, SECOND_ADDRESS_TOPIC)))) .isTrue(); assertThat( query.matches( new Log( FIRST_ADDRESS, Bytes.EMPTY, List.of(ERC20_TRANSFER_EVENT, SECOND_ADDRESS_TOPIC, FIRST_ADDRESS_TOPIC)))) .isTrue(); }