PowerMockito.whenNew(JarContentFileInfo.class).withParameterTypes(File.class).withArguments(any(File.class))
.thenReturn(mockJarContentFileInfo);
when(mockJarContentFileInfo.getVersion(isNull(String.class))).thenReturn("testDisplayVersion");
//create object to test and inject required dependencies
when(objectUnderTest.discoverDeployedPackages(any(PackageType.class))).thenCallRealMethod();
//run code under test
Set<ResourcePackageDetails> result = objectUnderTest.discoverDeployedPackages(mockPackageType);
//verify the results (Assert and mock verification)