@Test
public void testTypeRegistrationFromTypeInfo() {

	ExecutionConfig conf = new ExecutionConfig();
	Serializers.recursivelyRegisterType(new GenericTypeInfo<>(ClassWithNested.class), conf, new HashSet<Class<?>>());
	KryoSerializer<String> kryo = new KryoSerializer<>(String.class, conf); // we create Kryo from another type.
	assertTrue(kryo.getKryo().getRegistration(FromNested.class).getId() > 0);
	assertTrue(kryo.getKryo().getRegistration(ClassWithNested.class).getId() > 0);
	assertTrue(kryo.getKryo().getRegistration(Path.class).getId() > 0);
	// check if the generic type from one field is also registered (its very likely that
	// generic types are also used as fields somewhere.
	assertTrue(kryo.getKryo().getRegistration(FromGeneric1.class).getId() > 0);
	assertTrue(kryo.getKryo().getRegistration(FromGeneric2.class).getId() > 0);
	assertTrue(kryo.getKryo().getRegistration(Node.class).getId() > 0);
}