BundleMaker { public boolean hasOsgiManifest(File f) { Manifest mf = getManifest(f); if (mf==null) return false; String sn = mf.getMainAttributes().getValue(Constants.BUNDLE_SYMBOLICNAME); return Strings.isNonBlank(sn); } BundleMaker(@Nonnull ResourceUtils resources);  BundleMaker(@Nonnull Framework f, @Nonnull ResourceUtils resources);  BundleMaker(@Nonnull ManagementContext mgmt); void setDefaultClassForLoading(Class<?> optionalDefaultClassForLoading); File createJarFromClasspathDir(String path); boolean hasOsgiManifest(File f); Manifest getManifest(File f); File copyAddingManifest(File f, Map<String,String> attrs); File copyAddingManifest(File f, Manifest mf); File copyAdding(File f, Map<ZipEntry, ? extends InputStream> entries); File copyAddingAtEnd(File f, Map<ZipEntry, ? extends InputStream> entries); File copyRemoving(File f, final Set<String> itemsToRemove); File copyRemoving(File f, Predicate<? super String> filter); @Deprecated Bundle installBundle(File f, boolean start); File createTempBundle(String nameHint, Manifest mf, Map<ZipEntry, InputStream> files); File createTempBundle(String nameHint, Map<String, String> mf, Map<ZipEntry, InputStream> files); File createTempZip(String nameHint, Map<ZipEntry, InputStream> files);  }
@Test public void testHasOsgiManifestWhenNoManifest() throws Exception { assertFalse(bundleMaker.hasOsgiManifest(emptyJar)); }