public boolean hasOobLog(String secretString) {
    // making a blocking call to get result
    Optional<PollingResult> result = sendPollingRequest(secretString);

    if (result.isPresent()) {
      // In the future we may refactor hasOobLog() to return finer grained info about what kind
      // of oob is logged
      return result.get().getHasDnsInteraction() || result.get().getHasHttpInteraction();
    } else {
      // we may choose to retry sendPollingRequest() if oob interactions do arrive late.
      return false;
    }
  }
@Test
  public void isVulnerable_validLogRecordWithHttpLogged_returnsTrue() throws IOException {
    PollingResult log = PollingResult.newBuilder().setHasHttpInteraction(true).build();
    String body = JsonFormat.printer().preservingProtoFieldNames().print(log);
    MockWebServer mockWebServer = new MockWebServer();
    mockWebServer.enqueue(new MockResponse().setResponseCode(HttpStatus.OK.code()).setBody(body));
    client = new TcsClient(VALID_DOMAIN, VALID_PORT, mockWebServer.url("/").toString(), httpClient);

    boolean detectionResult = client.hasOobLog(SECRET);

    assertThat(detectionResult).isTrue();
    mockWebServer.shutdown();
  }