@Override
  public ProtobufSystemInfo.Section toProtobuf() {
    ProtobufSystemInfo.Section.Builder protobuf = ProtobufSystemInfo.Section.newBuilder();
    protobuf.setName("Search Indexes");
    try {
      completeIndexAttributes(protobuf);
    } catch (Exception es) {
      LoggerFactory.getLogger(EsIndexesSection.class).warn("Failed to retrieve ES attributes. There will be only a single \"Error\" attribute.", es);
      setAttribute(protobuf, "Error", es.getCause() instanceof ElasticsearchException ? es.getCause().getMessage() : es.getMessage());
    }
    return protobuf.build();
  }
@Test
  public void index_attributes() {
    ProtobufSystemInfo.Section section = underTest.toProtobuf();

    // one index "issues"
    assertThat(attribute(section, "Index issues - Docs").getLongValue()).isZero();
    assertThat(attribute(section, "Index issues - Shards").getLongValue()).isPositive();
    assertThat(attribute(section, "Index issues - Store Size").getStringValue()).isNotNull();
  }