### Question:
ListComponentsCommand implements AdminCommand, AdminCommandSecurity.AccessCheckProvider { boolean isApplicationOfThisType(final Application app, String type) { if (type.equals("application")) { type = "ear"; } else if (type.equals("webservice")) { type = "webservices"; } List <Engine> engineList = getAppEngines(app); for (Engine engine : engineList) { if (engine.getSniffer().equals(type)) { return true; } } return false; }  @Override Collection<? extends AccessCheck> getAccessChecks(); void execute(AdminCommandContext context); @Param(primary=true, optional=true)
    public String target; @Param(optional=true, defaultValue="false", name="long", shortName="l")
    public Boolean long_opt; @Param(optional=true, defaultValue="false", shortName="t")
    public Boolean terse; @Param(optional=true, defaultValue="false")
    public Boolean subcomponents; }### Answer:
@Test public void isApplicationOfThisTypeTest() { try { ApplicationTest app = new ApplicationTest(); Engine eng = new EngineTest(); eng.setSniffer("web"); List<Engine> engines = new ArrayList<Engine>(); engines.add(eng); List<Module> modules = new ArrayList<Module>(); ModuleTest aModule = new ModuleTest(); aModule.setEngines(engines); modules.add(aModule); app.setModules(modules); boolean ret = lcc.isApplicationOfThisType(app, "web"); assertTrue("test app with sniffer engine=web", true==lcc.isApplicationOfThisType(app, "web")); assertFalse("test app with sniffer engine=web", true==lcc.isApplicationOfThisType(app, "ejb")); } catch (Exception ex) { } }