### Question:
BesuCommandCustomFactory implements CommandLine.IFactory { @SuppressWarnings("unchecked") @Override public <T> T create(final Class<T> cls) throws Exception { if (CommandLine.IVersionProvider.class.isAssignableFrom(cls)) { return (T) new VersionProvider(pluginVersionsProvider); } return defaultFactory.create(cls); } BesuCommandCustomFactory(final PluginVersionsProvider pluginVersionsProvider); @SuppressWarnings("unchecked") @Override T create(final Class<T> cls);  }### Answer:
@Test public void testCreateVersionProviderInstance() throws Exception { final BesuCommandCustomFactory besuCommandCustomFactory = new BesuCommandCustomFactory(pluginVersionsProvider); final VersionProvider versionProvider = besuCommandCustomFactory.create(VersionProvider.class); assertThat(versionProvider.getVersion()).containsExactly(BesuInfo.version(), "v1", "v2"); }