### Question:
ViewLoaderReflectionUtils { @SuppressWarnings("unchecked") public static <ViewType extends View<? extends ViewModelType>, ViewModelType extends ViewModel> ViewModelType createViewModel( ViewType view) { final Class<?> viewModelType = TypeResolver.resolveRawArgument(View.class, view.getClass()); if (viewModelType == ViewModel.class) { return null; } if (TypeResolver.Unknown.class == viewModelType) { return null; } return (ViewModelType) DependencyInjector.getInstance().getInstanceOf(viewModelType); }  static Optional<Field> getViewModelField(Class<? extends View> viewType, Class<?> viewModelType); static List<Field> getScopeFields(Class<?> viewModelType); static List<Field> getViewModelFields(Class<? extends View> viewType); @SuppressWarnings("unchecked") static ViewModelType getExistingViewModel(
            ViewType view); static void injectViewModel(final View view, ViewModel viewModel); @SuppressWarnings("unchecked") static void createAndInjectViewModel(final V view,
            Consumer<ViewModel> newVmConsumer); static void injectContext(View codeBehind, ContextImpl context); @SuppressWarnings("unchecked") static ViewModelType createViewModel(
            ViewType view); static void initializeViewModel(ViewModelType viewModel);  }### Answer:
@Test public void testCreateViewModel() { class TestView implements View<TestViewModel> { } ViewModel viewModel = ViewLoaderReflectionUtils.createViewModel(new TestView()); assertThat(viewModel).isNotNull().isInstanceOf(TestViewModel.class); }
@Test public void testCreateViewModelWithoutViewModelType() { class TestView implements View { } ViewModel viewModel = ViewLoaderReflectionUtils.createViewModel(new TestView()); assertThat(viewModel).isNull(); }
@Test public void testCreateViewModelWithGeneticViewModelAsType() { class TestView implements View<ViewModel> { } ViewModel viewModel = ViewLoaderReflectionUtils.createViewModel(new TestView()); assertThat(viewModel).isNull(); }