ScriptEngineUtils { public static boolean canFactoryForExtensionProcessViews(String extension, Dictionary<String, String> headers) { ScriptEngineFactory engineFactory = getInstance().enginesManager.getFactoryForExtension(extension); return canFactoryProcessViews(engineFactory, headers); } private  ScriptEngineUtils(); static boolean canFactoryForExtensionProcessViews(String extension, Dictionary<String, String> headers); static boolean canFactoryProcessViews(ScriptEngineFactory scriptFactory, Dictionary<String, String> headers); static ScriptEngineUtils getInstance(); ScriptEngine getEngineByName(String name); ScriptEngine scriptEngine(String extension);  }
@Test public void canFactoryProcessViewsShouldThrowIllegalArgExceptionIfExtensionIsNullOrEmpty() { try { ScriptEngineUtils.canFactoryForExtensionProcessViews(null, null); fail(); } catch (IllegalArgumentException e) { } try { ScriptEngineUtils.canFactoryForExtensionProcessViews("", null); fail(); } catch (IllegalArgumentException e) { } }