public HttpResponse getLogs(ApplicationId applicationId, Optional<DomainName> hostname, Query apiParams) {
        Exception exception = null;
        for (var uri : getLogServerUris(applicationId, hostname)) {
            try {
                return logRetriever.getLogs(uri.withQuery(apiParams), activationTime(applicationId));
            } catch (RuntimeException e) {
                exception = e;
                log.log(Level.INFO, e.getMessage());
            }
        }
        return HttpErrorResponse.internalServerError(Exceptions.toMessageString(exception));
    }
@Test
    public void getLogs() throws IOException {
        deployApp(testAppLogServerWithContainer);
        HttpResponse response = applicationRepository.getLogs(applicationId(), Optional.empty(), Query.empty());
        assertEquals(200, response.getStatus());
        ByteArrayOutputStream buffer = new ByteArrayOutputStream();
        response.render(buffer);
        assertEquals("log line", buffer.toString(UTF_8));
    }