public Integer doCall() throws Exception {
        List<Row> rows = new ArrayList<>();

        List<Integration> integrations = client(Integration.class).list().getItems();
        integrations
                .forEach(integration -> {
                    Row row = new Row();
                    row.name = integration.getMetadata().getName();

                    row.ready = "0/1";
                    if (integration.getStatus() != null) {
                        row.phase = integration.getStatus().getPhase();

                        if (integration.getStatus().getConditions() != null) {
                            row.ready
                                    = integration.getStatus().getConditions().stream().filter(c -> c.getType().equals("Ready"))
                                            .anyMatch(c -> c.getStatus().equals("True")) ? "1/1" : "0/1";
                        }

                        row.kit = integration.getStatus().getIntegrationKit() != null
                                ? integration.getStatus().getIntegrationKit().getName() : "";
                    } else {
                        row.phase = "Unknown";
                    }

                    rows.add(row);
                });

        if (!rows.isEmpty()) {
            if (name) {
                rows.forEach(r -> printer().println(r.name));
            } else {
                printer().println(AsciiTable.getTable(AsciiTable.NO_BORDERS, rows, Arrays.asList(
                        new Column().header("NAME").dataAlign(HorizontalAlign.LEFT)
                                .maxWidth(40, OverflowBehaviour.ELLIPSIS_RIGHT)
                                .with(r -> r.name),
                        new Column().header("PHASE").headerAlign(HorizontalAlign.LEFT)
                                .with(r -> r.phase),
                        new Column().header("KIT").headerAlign(HorizontalAlign.LEFT).with(r -> r.kit),
                        new Column().header("READY").dataAlign(HorizontalAlign.CENTER).with(r -> r.ready))));
            }
        }

        return 0;
    }
@Test
    public void shouldListPendingIntegration() throws Exception {
        Integration integration = createIntegration("building");
        IntegrationStatus status = new IntegrationStatus();

        status.setPhase("Building Kit");
        status.setConditions(new ArrayList<>());
        Conditions readyCondition = new Conditions();
        readyCondition.setType("Ready");
        readyCondition.setStatus("False");
        status.getConditions().add(readyCondition);
        integration.setStatus(status);

        kubernetesClient.resources(Integration.class).resource(integration).create();

        createCommand().doCall();

        List<String> output = printer.getLines();
        Assertions.assertEquals("NAME      PHASE         KIT  READY", output.get(0));
        Assertions.assertEquals("building  Building Kit        0/1", output.get(1));
    }