public static <T> StateSerializerProvider<T> fromNewRegisteredSerializer(
            TypeSerializer<T> registeredStateSerializer) {
        return new EagerlyRegisteredStateSerializerProvider<>(registeredStateSerializer);
    }
@Test
    void testPreviousSchemaSerializerForEagerlyRegisteredStateSerializerProvider() {
        StateSerializerProvider<TestType> testProvider =
                StateSerializerProvider.fromNewRegisteredSerializer(
                        new TestType.V1TestTypeSerializer());

        // this should fail with an exception
        assertThatThrownBy(testProvider::previousSchemaSerializer)
                .isInstanceOf(UnsupportedOperationException.class);
    }