@Test(expected = IllegalArgumentException.class) public void shouldRaiseAnErrorIfTheMetricNameIsLongerThanTheAllowedLength() { MetricName metricName = mock(MetricName.class); when(metricName.getMetric()).thenReturn(METRIC_NAME_64_CHARS); validator.validateNameConstraints(metricName); }
void validateNameConstraints(MetricName metricName) { validateName(metricName); validateInstance(metricName); }
MetricNameValidator { void validateNameConstraints(MetricName metricName) { validateName(metricName); validateInstance(metricName); } }
MetricNameValidator { void validateNameConstraints(MetricName metricName) { validateName(metricName); validateInstance(metricName); } MetricNameValidator(int nameLimit, int domainLimit); }
MetricNameValidator { void validateNameConstraints(MetricName metricName) { validateName(metricName); validateInstance(metricName); } MetricNameValidator(int nameLimit, int domainLimit);  }
MetricNameValidator { void validateNameConstraints(MetricName metricName) { validateName(metricName); validateInstance(metricName); } MetricNameValidator(int nameLimit, int domainLimit);   }