@Test public void shouldGetProductInfoWhenSystemHasManyJars() { System.setProperty("java.class.path", "src/test/resources/gateway.server-5.0.0.7.jar" + System.getProperty("path.separator") + "src/test/resources/gateway.server-5.0.0.8.jar" + System.getProperty("path.separator") + "src/test/resources/gateway.server-5.0.0.9.jar" + System.getProperty("path.separator") + "src/test/resources/gateway.server-noMF.jar" + System.getProperty("path.separator") + "src/test/resources/gateway.server-noAttrs.jar" + System.getProperty("path.separator") + "src/test/resources/gateway.server-missing.jar"); productInfo = getProductInfoInstance(); Assert.assertEquals("5.0.0.9 Beta", productInfo.getVersion()); Assert.assertEquals("Kaazing WebSocket Gateway", productInfo.getTitle()); Assert.assertEquals("Test.Gateway", productInfo.getEdition()); }
public static ProductInfo getProductInfoInstance(){ if (productInfo != null) { return productInfo; } return generateProductInfo(); }
ProductInfoReader { public static ProductInfo getProductInfoInstance(){ if (productInfo != null) { return productInfo; } return generateProductInfo(); } }
ProductInfoReader { public static ProductInfo getProductInfoInstance(){ if (productInfo != null) { return productInfo; } return generateProductInfo(); } private  ProductInfoReader(); }
ProductInfoReader { public static ProductInfo getProductInfoInstance(){ if (productInfo != null) { return productInfo; } return generateProductInfo(); } private  ProductInfoReader(); static ProductInfo getProductInfoInstance(); static void setProductInfo(ProductInfo productInfo); }
ProductInfoReader { public static ProductInfo getProductInfoInstance(){ if (productInfo != null) { return productInfo; } return generateProductInfo(); } private  ProductInfoReader(); static ProductInfo getProductInfoInstance(); static void setProductInfo(ProductInfo productInfo);  }