String format() {
        StringBuilder builder = new StringBuilder();
        for (ReindexActions.Entry entry : actions.getEntries()) {
            builder.append(entry.name() + ": Consider re-indexing document type '" + entry.getDocumentType() +
                           "' in cluster '" + entry.getClusterName() + "' because:\n");
            int counter = 1;
            for (String message : entry.getMessages()) {
                builder.append("    " + (counter++) + ") " + message + "\n");
            }
        }
        return builder.toString();
    }
@Test
    public void formatting_of_single_action() {
        ReindexActions actions = new ConfigChangeActionsBuilder().
                reindex(CHANGE_ID, CHANGE_MSG, DOC_TYPE, CLUSTER, SERVICE_NAME).
                build().getReindexActions();
        assertEquals("field-type-change: Consider re-indexing document type 'music' in cluster 'foo' because:\n" +
                        "    1) change\n",
                new ReindexActionsFormatter(actions).format());
    }