@Override
    public DataSerializableFactory createFactory() {
        return new Factory();
    }
@Test(expected = IllegalArgumentException.class)
    public void testInvalidType() {
        MetricsDataSerializerHook hook = new MetricsDataSerializerHook();
        hook.createFactory().create(999);
    }