### Question:
MetricClassConfigurationManager { @SuppressWarnings("rawtypes") public MetricClassManager buildMetricClassManager(final Collection<String> metrics, final Map<String, Map> parameterizedMetrics) { final MetricClassManager metricClassManager; if (parameterizedMetrics == null || parameterizedMetrics.isEmpty()) { metricClassManager = new SimpleMetricClassManager(metrics); } else { metricClassManager = new ParameterizedMetricClassManager(metrics, parameterizedMetrics); } return metricClassManager; }  static MetricClassConfigurationManager getInstance(); @SuppressWarnings("rawtypes") MetricClassManager buildMetricClassManager(final Collection<String> metrics, final Map<String, Map> parameterizedMetrics); BigDecimal getDefaultMaximumGrade(); MetricClassConfigurationManager setDefaultMaximumGrade(final float defaultMaximumGrade); BigDecimal getDefaultMissingGrade(); MetricClassConfigurationManager setDefaultMissingGrade(final float defaultMissingGrade);  }### Answer:
@Test public void returnsSimpleMetricManager_whenParameterizedMetricsAreNull() { assertThat(factory.buildMetricClassManager(METRICS, null)).isInstanceOf(SimpleMetricClassManager.class); }
@Test public void returnsSimpleMetricManager_whenParameterizedMetricsIsEmpty() { assertThat(factory.buildMetricClassManager(METRICS, new HashMap<>())).isInstanceOf(SimpleMetricClassManager.class); }
@Test @SuppressWarnings({"unchecked", "rawtypes"}) public void returnsParameterizedMetricManager_whenParameterizedMetricsSet() { final Map precisionAtFiveConfig = new HashMap(); precisionAtFiveConfig.put("class", "io.sease.rre.core.domain.metrics.impl.PrecisionAtK"); precisionAtFiveConfig.put("v", 5); final Map<String, Map> parameterizedConfig = new HashMap<>(); parameterizedConfig.put("pAt5", precisionAtFiveConfig); MetricClassManager test = factory.buildMetricClassManager(METRICS, parameterizedConfig); assertThat(test).isInstanceOf(ParameterizedMetricClassManager.class); }