@Override
  public ProtobufSystemInfo.Section toProtobuf() {
    return toProtobuf(ManagementFactory.getMemoryMXBean());
  }
@Test
  public void toSystemInfoSection() {
    JvmStateSection underTest = new JvmStateSection(PROCESS_NAME);
    ProtobufSystemInfo.Section section = underTest.toProtobuf();

    assertThat(section.getName()).isEqualTo(PROCESS_NAME);
    assertThat(section.getAttributesCount()).isPositive();
    assertThat(section.getAttributesList()).extracting("key")
      .contains(
        "Max Memory (MB)", "Free Memory (MB)",
        "Heap Max (MB)",
        "System Load Average", "Threads");
  }