public final void register(Class type, Serializer serializer) {
        if (type == null) {
            throw new IllegalArgumentException("type is required");
        }
        if (serializer.getTypeId() <= 0) {
            throw new IllegalArgumentException(
                    "Type ID must be positive. Current: " + serializer.getTypeId() + ", Serializer: " + serializer);
        }
        safeRegister(type, createSerializerAdapter(serializer));
    }
@Test(expected = IllegalArgumentException.class)
    public void testRegister_nullType() {
        abstractSerializationService.register(null, new StringBufferSerializer(true));
    }