MetricsType getMetricsType(String remaining) {
        String name = StringHelper.before(remaining, ":");
        MetricsType type;
        if (name == null) {
            type = DEFAULT_METRICS_TYPE;
        } else {
            type = MetricsType.getByName(name);
        }
        if (type == null) {
            throw new RuntimeCamelException("Unknown metrics type \"" + name + "\"");
        }
        return type;
    }
@Test
    public void testGetMetricsTypeNotSet() {
        assertThat(component.getMetricsType("no-metrics-type"), is(MetricsComponent.DEFAULT_METRICS_TYPE));
    }