public void assertEquals(String tag, BundleDescription original, BundleDescription copy) { if (original == copy) return; assertEquals(tag + ".0", original.getBundleId(), copy.getBundleId()); assertEquals(tag + ".1", original.getSymbolicName(), copy.getSymbolicName()); assertEquals(tag + ".2", original.getVersion(), copy.getVersion()); assertEquals(tag + ".3", original.getLocation(), copy.getLocation()); assertEquals(tag + ".4", original.isResolved(), copy.isResolved()); assertEquals(tag + ".5", original.getHost(), copy.getHost()); ExportPackageDescription[] originalExportPackages = original.getExportPackages(); ExportPackageDescription[] copyExportPackages = copy.getExportPackages(); assertEquals(tag + ".6", originalExportPackages.length, copyExportPackages.length); for (int i = 0; i < originalExportPackages.length; i++) assertEquals(tag + ".7." + i, originalExportPackages[i], copyExportPackages[i]); ImportPackageSpecification[] originalImportPackages = original.getImportPackages(); ImportPackageSpecification[] copyImportPackages = copy.getImportPackages(); assertEquals(tag + ".8", originalImportPackages.length, copyImportPackages.length); for (int i = 0; i < originalImportPackages.length; i++) assertEquals(tag + ".9." + i, originalImportPackages[i], copyImportPackages[i]); BundleSpecification[] originalRequiredBundles = original.getRequiredBundles(); BundleSpecification[] copyRequiredBundles = copy.getRequiredBundles(); assertEquals(tag + ".10", originalRequiredBundles.length, copyRequiredBundles.length); for (int i = 0; i < originalRequiredBundles.length; i++) assertEquals(tag + ".11." + i, originalRequiredBundles[i], copyRequiredBundles[i]); ExportPackageDescription[] originalResolvedImports = original.getResolvedImports(); ExportPackageDescription[] copyResolvedImports = copy.getResolvedImports(); assertEquals(tag + ".12", originalResolvedImports.length, copyResolvedImports.length); for (int i = 0; i < originalResolvedImports.length; i++) assertEquals(tag + ".13." + i, originalResolvedImports[i], copyResolvedImports[i]); BundleDescription[] originalResolvedRequires = original.getResolvedRequires(); BundleDescription[] copyResolvedRequires = copy.getResolvedRequires(); assertEquals(tag + ".14", originalResolvedRequires.length, copyResolvedRequires.length); for (int i = 0; i < originalResolvedRequires.length; i++) assertEquals(tag + ".15." + i, originalResolvedRequires[i], copyResolvedRequires[i]);
public void assertEquals(State original, State copy) { assertEquals("", original, copy);
	public void assertEquals(String tag, BundleDescription original, BundleDescription copy) {		if (original == copy)			return;		assertEquals(tag + ".0", original.getBundleId(), copy.getBundleId());		assertEquals(tag + ".1", original.getSymbolicName(), copy.getSymbolicName());		assertEquals(tag + ".2", original.getVersion(), copy.getVersion());		assertEquals(tag + ".3", original.getLocation(), copy.getLocation());		assertEquals(tag + ".4", original.isResolved(), copy.isResolved());		assertEquals(tag + ".5", original.getHost(), copy.getHost());		ExportPackageDescription[] originalExportPackages = original.getExportPackages();		ExportPackageDescription[] copyExportPackages = copy.getExportPackages();		assertEquals(tag + ".6", originalExportPackages.length, copyExportPackages.length);		for (int i = 0; i < originalExportPackages.length; i++)			assertEquals(tag + ".7." + i, originalExportPackages[i], copyExportPackages[i]);		ImportPackageSpecification[] originalImportPackages = original.getImportPackages();		ImportPackageSpecification[] copyImportPackages = copy.getImportPackages();		assertEquals(tag + ".8", originalImportPackages.length, copyImportPackages.length);		for (int i = 0; i < originalImportPackages.length; i++)			assertEquals(tag + ".9." + i, originalImportPackages[i], copyImportPackages[i]);		BundleSpecification[] originalRequiredBundles = original.getRequiredBundles();		BundleSpecification[] copyRequiredBundles = copy.getRequiredBundles();		assertEquals(tag + ".10", originalRequiredBundles.length, copyRequiredBundles.length);		for (int i = 0; i < originalRequiredBundles.length; i++)			assertEquals(tag + ".11." + i, originalRequiredBundles[i], copyRequiredBundles[i]);		ExportPackageDescription[] originalResolvedImports = original.getResolvedImports();		ExportPackageDescription[] copyResolvedImports = copy.getResolvedImports();		assertEquals(tag + ".12", originalResolvedImports.length, copyResolvedImports.length);		for (int i = 0; i < originalResolvedImports.length; i++)			assertEquals(tag + ".13." + i, originalResolvedImports[i], copyResolvedImports[i]);		BundleDescription[] originalResolvedRequires = original.getResolvedRequires();		BundleDescription[] copyResolvedRequires = copy.getResolvedRequires();		assertEquals(tag + ".14", originalResolvedRequires.length, copyResolvedRequires.length);		for (int i = 0; i < originalResolvedRequires.length; i++)			assertEquals(tag + ".15." + i, originalResolvedRequires[i], copyResolvedRequires[i]);	}