@Test public void testGetSelectedSmosProduct_noProduct() { assumeTrue(isGuiAvailable); final DefaultAppContext appContext = new DefaultAppContext("test"); assertNull(appContext.getSelectedProduct()); assertNull(DialogHelper.getSelectedSmosProduct(appContext)); }
static Product getSelectedSmosProduct(AppContext appContext) { final Product selectedProduct = appContext.getSelectedProduct(); if (selectedProduct != null) { if (isSupportedType(selectedProduct.getProductType())) { return selectedProduct; } } return null; }
DialogHelper { static Product getSelectedSmosProduct(AppContext appContext) { final Product selectedProduct = appContext.getSelectedProduct(); if (selectedProduct != null) { if (isSupportedType(selectedProduct.getProductType())) { return selectedProduct; } } return null; } }
DialogHelper { static Product getSelectedSmosProduct(AppContext appContext) { final Product selectedProduct = appContext.getSelectedProduct(); if (selectedProduct != null) { if (isSupportedType(selectedProduct.getProductType())) { return selectedProduct; } } return null; }  }
DialogHelper { static Product getSelectedSmosProduct(AppContext appContext) { final Product selectedProduct = appContext.getSelectedProduct(); if (selectedProduct != null) { if (isSupportedType(selectedProduct.getProductType())) { return selectedProduct; } } return null; }   }
DialogHelper { static Product getSelectedSmosProduct(AppContext appContext) { final Product selectedProduct = appContext.getSelectedProduct(); if (selectedProduct != null) { if (isSupportedType(selectedProduct.getProductType())) { return selectedProduct; } } return null; }    }