Icon mockIcon = Mockito.mock(Icon.class);
TypeInfo<?> info = new TypeInfo<TypeInfoTest>(TypeInfoTest.class){};
// Try with a null platform - should fail to retrieve asset
new PlatformAccess().setPlatform(null);
Assert.assertNull(info.getAsset(Icon.class));
// Try with a platform but no registry - should fail to retrieve asset
new PlatformAccess().setPlatform(mockPlatform);
Assert.assertNull(info.getAsset(Icon.class));
// Try with a mock registry (but no assets) - should fail to retrieve
Mockito.when(mockPlatform.getComponentRegistry()).thenReturn(mockRegistry);
Assert.assertNull(info.getAsset(Icon.class));
// Try with a mock registry that has the requested asset - should retrieve it
Mockito.when(mockRegistry.getAsset(info, Icon.class)).thenReturn(mockIcon);
Assert.assertEquals(info.getAsset(Icon.class), mockIcon);
// Restore old platform
new PlatformAccess().setPlatform(oldPlatform);
}