@Test
@Ignore // ignore, for now, because this is an integration test that requires livy configured on the test system
public void testGetLivySessions() throws JsonProcessingException, InterruptedException {

    System.setProperty("sun.security.krb5.debug", "true");
    System.setProperty("sun.security.jgss.debug", "true");
    SessionsGet sg = new SessionsGet.Builder().from(1).size(2).build();
    String sgJson = new ObjectMapper().writeValueAsString(sg);
    logger.debug("{}", sgJson);
    assertThat(sgJson).isEqualToIgnoringCase("{\"from\":1,\"size\":2}");
    logger.debug("kerberosSparkProperties={}", kerberosSparkProperties);
    SparkShellProcess sparkProcess = sparkLivyProcessManager.getProcessForUser("kylo");
    //((SparkLivyProcess) sparkProcess).setPort(8999);
    JerseyRestClient client = sparkLivyProcessManager.getClient(sparkProcess);
    sparkLivyProcessManager.start("kylo");
    Integer stmtId = 0;
    Statement statement = livyRestProvider.pollStatement(client, sparkProcess, stmtId);
    logger.debug("statement={}", statement);
    assertThat(statement.getState()).isEqualTo(StatementState.available);
    assertThat(statement.getOutput().getStatus()).isEqualTo(StatementOutputStatus.ok);
}