protected final void safeRegister(final Class type, final Serializer serializer) {
        safeRegister(type, createSerializerAdapter(serializer));
    }
@Test(expected = IllegalStateException.class)
    public void testSafeRegister_alreadyRegisteredTypeId() {
        abstractSerializationService.safeRegister(StringBuffer.class, new StringBufferSerializer(true));
        abstractSerializationService.safeRegister(StringBuilder.class, new TheOtherGlobalSerializer(true));
    }