MleBO { public MleData findMle(String mleName, String mleVersion, String osName, String osVersion, String oemName) { try { TblMle tblMle = getMleDetails(mleName, mleVersion, osName, osVersion, oemName); if (tblMle == null) { throw new ASException(ErrorCode.WS_MLE_DOES_NOT_EXIST, mleName, mleVersion); } MleData mleData = createMleDataFromDatabaseRecord(tblMle, true); return mleData; } catch (ASException ase) { throw ase; } catch (Exception e) { log.error("Error during retrieval of MLE information.", e); throw new ASException(ErrorCode.WS_MLE_RETRIEVAL_ERROR, e.getClass().getSimpleName()); } } MleBO(); String addMLe(MleData mleData, String mleUuid); String updateMle(MleData mleData, String mleUuid); String deleteMle(String mleName, String mleVersion, String osName, String osVersion, String oemName, String mleUuid); List<MleData> listMles(String searchCriteria); MleData findMle(String mleName, String mleVersion, String osName, String osVersion, String oemName); MleData createMleDataFromDatabaseRecord(TblMle tblMle, boolean addManifest); String addPCRWhiteList(PCRWhiteList pcrData); String addPCRWhiteList(PCRWhiteList pcrData, EntityManager em, String uuid, String mleUuid); String updatePCRWhiteList(PCRWhiteList pcrData); String updatePCRWhiteList(PCRWhiteList pcrData, EntityManager em, String uuid); String deletePCRWhiteList(String pcrName, String algorithmBank, String mleName, String mleVersion, String osName, String osVersion, String oemName, String pcrUuid); String addModuleWhiteList(ModuleWhiteList moduleData); String addModuleWhiteList(ModuleWhiteList moduleData, EntityManager em, String uuid, String mleUuid); String updateModuleWhiteList(ModuleWhiteList moduleData); String updateModuleWhiteList(ModuleWhiteList moduleData, EntityManager em, String uuid); String deleteModuleWhiteList(String componentName, String eventName, String pcrBank, String mleName, String mleVersion,
            String osName, String osVersion, String oemName, String uuid); List<ModuleWhiteList> getModuleWhiteList(String mleName, String mleVersion,
            String osName, String osVersion, String oemName); String addMleSource(MleSource mleSourceObj, String uuid, String mleUuid); String updateMleSource(MleSource mleSourceObj, String mleUuid); String deleteMleSource(String mleName, String mleVersion, String osName, String osVersion, String oemName, String mleUuid); String getMleSource(String mleName, String mleVersion, String osName, String osVersion, String oemName);  }
@Test public void testGetMLEDetailsVmm() { System.out.println("getMLEDetailsVmm"); MleBO instance = new MleBO(); MleData vmm = getVmmMle(); MleData resultVmm = instance.findMle(vmm.getName(), vmm.getVersion(), vmm.getOsName(), vmm.getOsVersion(), null); assertNotNull(resultVmm); }
@Test public void testGetMLEDetailsBios() { System.out.println("getMLEDetailsBios"); MleBO instance = new MleBO(); MleData bios = getBiosMle(); MleData resultBios = instance.findMle(bios.getName(), bios.getVersion(), null, null, bios.getOemName()); assertNotNull(resultBios); }