test_class.declarator: mockServer
test_class.modifier: private static
test_class.original_string: private static KafkaServer mockServer;
test_class.type: KafkaServer
test_class.var_name: mockServer
test_class.file: support-metrics-client/src/test/java/io/confluent/support/metrics/collectors/BasicCollectorTest.java
test_class.identifier: BasicCollectorTest
test_case.body: @Test
    public void testCollectMetrics() {
      // Given
      TimeUtils time = new TimeUtils();
      Uuid uuid = new Uuid();
      long unixTimeAtTestStart = time.nowInUnixTime();
      Collector metricsCollector = new BasicCollector(mockServer, time, uuid);
  
      // When
      GenericContainer metricsRecord = metricsCollector.collectMetrics();
  
      // Then
      assertThat(metricsRecord).isInstanceOf(SupportKafkaMetricsBasic.class);
      assertThat(metricsRecord.getSchema()).isEqualTo(SupportKafkaMetricsBasic.getClassSchema());
      SupportKafkaMetricsBasic basicRecord = (SupportKafkaMetricsBasic) metricsRecord;
      assertThat(basicRecord.getTimestamp()).isBetween(unixTimeAtTestStart, time.nowInUnixTime());
      assertThat(basicRecord.getKafkaVersion()).isEqualTo(AppInfoParser.getVersion());
      assertThat(basicRecord.getConfluentPlatformVersion()).isEqualTo(Version.getVersion());
      assertThat(basicRecord.getCollectorState()).isEqualTo(metricsCollector.getRuntimeState().stateId());
      assertThat(basicRecord.getBrokerProcessUUID()).isEqualTo(uuid.toString());
    }
test_case.class_method_signature: BasicCollectorTest.testCollectMetrics()
test_case.full_signature: @Test public void testCollectMetrics()
test_case.identifier: testCollectMetrics
test_case.invocations: nowInUnixTime collectMetrics isInstanceOf assertThat isEqualTo assertThat getSchema getClassSchema isBetween assertThat getTimestamp nowInUnixTime isEqualTo assertThat getKafkaVersion getVersion isEqualTo assertThat getConfluentPlatformVersion getVersion isEqualTo assertThat getCollectorState stateId getRuntimeState isEqualTo assertThat getBrokerProcessUUID toString
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCollectMetrics()
focal_class.declarator: time
focal_class.modifier: private final
focal_class.original_string: private final TimeUtils time;
focal_class.type: TimeUtils
focal_class.var_name: time
focal_class.declarator: uuid
focal_class.modifier: private final
focal_class.original_string: private final Uuid uuid;
focal_class.type: Uuid
focal_class.var_name: uuid
focal_class.declarator: server
focal_class.modifier: private final
focal_class.original_string: private final KafkaServer server;
focal_class.type: KafkaServer
focal_class.var_name: server
focal_class.file: support-metrics-client/src/main/java/io/confluent/support/metrics/collectors/BasicCollector.java
focal_class.identifier: BasicCollector
focal_class.class_method_signature: BasicCollector.BasicCollector(
        KafkaServer server,
        TimeUtils time
    )
focal_class.full_signature: public  BasicCollector(
        KafkaServer server,
        TimeUtils time
    )
focal_class.identifier: BasicCollector
focal_class.modifiers: public
focal_class.parameters: (
        KafkaServer server,
        TimeUtils time
    )
focal_class.signature:  BasicCollector(
        KafkaServer server,
        TimeUtils time
    )
focal_class.class_method_signature: BasicCollector.BasicCollector(
        KafkaServer server,
        TimeUtils time,
        Uuid uuid
    )
focal_class.full_signature: public  BasicCollector(
        KafkaServer server,
        TimeUtils time,
        Uuid uuid
    )
focal_class.identifier: BasicCollector
focal_class.modifiers: public
focal_class.parameters: (
        KafkaServer server,
        TimeUtils time,
        Uuid uuid
    )
focal_class.signature:  BasicCollector(
        KafkaServer server,
        TimeUtils time,
        Uuid uuid
    )
focal_class.class_method_signature: BasicCollector.collectMetrics()
focal_class.full_signature: @Override public GenericContainer collectMetrics()
focal_class.identifier: collectMetrics
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: GenericContainer
focal_class.signature: GenericContainer collectMetrics()
focal_class.superclass: extends Collector
focal_method.body: @Override
    public GenericContainer collectMetrics() {
      SupportKafkaMetricsBasic metricsRecord = new SupportKafkaMetricsBasic();
      metricsRecord.setTimestamp(time.nowInUnixTime());
      metricsRecord.setKafkaVersion(AppInfoParser.getVersion());
      metricsRecord.setConfluentPlatformVersion(Version.getVersion());
      metricsRecord.setCollectorState(this.getRuntimeState().stateId());
      metricsRecord.setBrokerProcessUUID(uuid.toString());
      metricsRecord.setClusterId(server.clusterId());
      return metricsRecord;
    }
focal_method.class_method_signature: BasicCollector.collectMetrics()
focal_method.full_signature: @Override public GenericContainer collectMetrics()
focal_method.identifier: collectMetrics
focal_method.invocations: setTimestamp nowInUnixTime setKafkaVersion getVersion setConfluentPlatformVersion getVersion setCollectorState stateId getRuntimeState setBrokerProcessUUID toString setClusterId clusterId
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: GenericContainer
focal_method.signature: GenericContainer collectMetrics()