PolicyDbDao { public String getPdpPolicyName(String name, String scope) { String finalName = ""; finalName += scope; finalName += "."; finalName += removeFileExtension(name); finalName += ".xml"; return finalName; } @Autowired  PolicyDbDao(SessionFactory sessionFactory);  PolicyDbDao();  PolicyDbDao(String init); static PolicyDbDao getPolicyDbDaoInstance(); void setPapEngine(PAPPolicyEngine papEngine2); @SuppressWarnings("deprecation") void startTransactionSynced(Session session, int waitTime); PolicyDbDaoTransaction getNewTransaction(); PolicyDbDaoTransaction getNewAuditTransaction(); static boolean stringEquals(String one, String two); String[] getPapUrlUserPass(); String[] splitPapUrlUserPass(String url); StdPDPGroup synchronizeGroupPoliciesInFileSystem(StdPDPGroup pdpGroup, GroupEntity groupentity); String removeExtensionAndVersionFromPolicyName(String originalPolicyName); String[] getPolicyNameAndVersionFromPolicyFileName(String originalPolicyName); String getPdpPolicyName(String name, String scope); void auditLocalDatabase(PAPPolicyEngine papEngine2); StdPDPGroup auditLocalFileSystem(StdPDPGroup group); void synchronizeConfigDataInFileSystem(); void deleteAllGroupTables(); @SuppressWarnings("unchecked") void auditGroups(PAPPolicyEngine papEngine2); String getConfigFile(String filename, PolicyRestAdapter policy); String getConfigFile(String inputFilename, String configType); String[] getNameScopeAndVersionFromPdpPolicy(String fileName); static String createNewPdpGroupId(String name); static boolean isNullOrEmpty(String... strings); List<?> getOtherServers(); void setOtherServers(List<?> otherServers); PAPPolicyEngine getPapEngine(); static boolean isJunit(); static void setJunit(boolean isJunit); static PolicyDbDaoTestClass getPolicyDbDaoTestClass(); static final String JSON_CONFIG; static final String XML_CONFIG; static final String PROPERTIES_CONFIG; static final String OTHER_CONFIG; static final String AUDIT_USER; static final String CONFIG; static final String ACTION; static final String GROUP_ID; static final String DELETED; static final String GROUPENTITY_SELECT; static final String PDPENTITY_SELECT; static final String GROUP_NOT_FOUND; static final String FOUND_IN_DB_NOT_DEL; static final String MORE_THAN_ONE_PDP; static final String DELETED_STATUS_FOUND; static final String DUPLICATE_GROUPID; static final String PDP_ID; static final String QUERY_FAILED_FOR_GROUP; static final String QUERY_FAILED_GET_GROUP; static final String SCOPE; static final String POLICYDBDAO_VAR; static final String DUP_POLICYID; static final String FOUND_IN_DB; }
@Test public void getPdpPolicyNameTest() { String name = "Decision_testname.1.json"; String scope = "com"; String expectedFinalname = "com.Decision_testname.1.xml"; String finalname = d.getPdpPolicyName(name, scope); Assert.assertEquals(expectedFinalname, finalname); }