@Test
public void testLogSearchWithMinimumParameters() throws Exception {

    stubSolrUrl();
    LogSearchCriteria logSearchCriteria = new LogSearchCriteria.Builder(TEST_APP_ID, TEST_FROM, TEST_TO).build();
    LogSearchResult result = logSearch.search(logSearchCriteria);
    verifyLogSearchResults(result);
    // please note that space should be escaped to '+' since Wiremock doesn't handle it when matching...
    String dateRangeValue = "%s:[%s+TO+%s]";
    Instant fromInstant = Instant.ofEpochMilli(TEST_FROM);
    Instant toInstant = Instant.ofEpochMilli(TEST_TO);
    dateRangeValue = String.format(dateRangeValue, COLUMN_NAME_LOG_TIME, fromInstant.toString(), toInstant.toString());
    String expectedLogLevels = "(" + String.join("+OR+", AmbariInfraWithStormLogSearch.DEFAULT_LOG_LEVELS) + ")";
    List<LoggedRequest> requests = wireMockRule.findAll(getRequestedFor(urlPathEqualTo(STUB_REQUEST_API_PATH)));
    assertEquals(1, requests.size());
    LoggedRequest request = requests.get(0);
    QueryParameter qParam = request.queryParameter("q");
    assertTrue(qParam.containsValue(COLUMN_NAME_LOG_MESSAGE + ":*"));
    QueryParameter fqParam = request.queryParameter("fq");
    assertTrue(fqParam.containsValue(COLUMN_NAME_STREAMLINE_TOPOLOGY_ID + ":" + TEST_APP_ID));
    assertTrue(fqParam.containsValue(COLUMN_NAME_TYPE + ":" + COLUMN_VALUE_TYPE_WORKER_LOG));
    assertTrue(fqParam.containsValue(dateRangeValue));
    assertTrue(fqParam.containsValue(COLUMN_NAME_LOG_LEVEL + ":" + expectedLogLevels));
    assertFalse(fqParam.hasValueMatching(ValuePattern.containing(COLUMN_NAME_STREAMLINE_COMPONENT_NAME)));
    QueryParameter sortParam = request.queryParameter("sort");
    assertTrue(sortParam.containsValue(COLUMN_NAME_LOG_TIME + "+asc"));
}