@Test
 public void statistics() {
   this.applicationId
       .then(this::uploadAndStartApplication)
       .then(
           applicationId ->
               this.cloudFoundryClient
                   .applicationsV2()
                   .statistics(
                       ApplicationStatisticsRequest.builder().applicationId(applicationId).build())
                   .map(
                       instanceStatistics ->
                           instanceStatistics.get("0").getStatistics().getName()))
       .subscribe(testSubscriber().assertEquals(TEST_APPLICATION_NAME));
 }
 private static Mono<ApplicationStatisticsResponse> requestApplicationStats(
     CloudFoundryClient cloudFoundryClient, String applicationId) {
   return cloudFoundryClient
       .applicationsV2()
       .statistics(ApplicationStatisticsRequest.builder().applicationId(applicationId).build());
 }