### Question:
MetricData { public static MetricData create( Resource resource, InstrumentationLibraryInfo instrumentationLibraryInfo, String name, String description, String unit, Type type, Collection<Point> points) { return new AutoValue_MetricData( resource, instrumentationLibraryInfo, name, description, unit, type, points); } MetricData(); abstract Resource getResource(); abstract InstrumentationLibraryInfo getInstrumentationLibraryInfo(); abstract String getName(); abstract String getDescription(); abstract String getUnit(); abstract Type getType(); abstract Collection<Point> getPoints(); static MetricData create(
      Resource resource,
      InstrumentationLibraryInfo instrumentationLibraryInfo,
      String name,
      String description,
      String unit,
      Type type,
      Collection<Point> points);  }### Answer:
@Test void metricData_NullInstrumentationLibraryInfo() { assertThrows( NullPointerException.class, () -> MetricData.create( Resource.getEmpty(), null, "metric_name", "metric_description", "ms", MetricData.Type.MONOTONIC_LONG, singletonList(DOUBLE_POINT)), "instrumentationLibraryInfo"); }
@Test void metricData_NullName() { assertThrows( NullPointerException.class, () -> MetricData.create( Resource.getEmpty(), InstrumentationLibraryInfo.getEmpty(), null, "metric_description", "ms", MetricData.Type.MONOTONIC_LONG, singletonList(DOUBLE_POINT)), "name"); }
@Test void metricData_NullDescription() { assertThrows( NullPointerException.class, () -> MetricData.create( Resource.getEmpty(), InstrumentationLibraryInfo.getEmpty(), "metric_name", null, "ms", MetricData.Type.MONOTONIC_LONG, singletonList(DOUBLE_POINT)), "description"); }
@Test void metricData_NullUnit() { assertThrows( NullPointerException.class, () -> MetricData.create( Resource.getEmpty(), InstrumentationLibraryInfo.getEmpty(), "metric_name", "metric_description", null, MetricData.Type.MONOTONIC_LONG, singletonList(DOUBLE_POINT)), "unit"); }
@Test void metricData_NullType() { assertThrows( NullPointerException.class, () -> MetricData.create( Resource.getEmpty(), InstrumentationLibraryInfo.getEmpty(), "metric_name", "metric_description", "ms", null, singletonList(DOUBLE_POINT)), "type"); }
@Test void metricData_NullPoints() { assertThrows( NullPointerException.class, () -> MetricData.create( Resource.getEmpty(), InstrumentationLibraryInfo.getEmpty(), "metric_name", "metric_description", "ms", MetricData.Type.MONOTONIC_LONG, null), "points"); }