PolicyUtils { public ArrayList<String> getPoliciesTobeCheked(String safeType, String safeName) { ArrayList<String> policiesTobeChecked = new ArrayList<String>(); policiesTobeChecked.addAll(getAdminPolicies()); policiesTobeChecked.addAll(getSudoPolicies(safeType, safeName)); return policiesTobeChecked; } PolicyUtils(); ArrayList<String> getPoliciesTobeCheked(String safeType, String safeName); ArrayList<String> getAdminPolicies(); String[] getCurrentPolicies(String token, String username, UserDetails userDetails); ArrayList<String> getCertPoliciesTobeCheked(String certName);  }
@Test public void test_getPoliciesTobeCheked() { List<String> expectedPolicies = new ArrayList<>(); expectedPolicies.add("safeadmin"); expectedPolicies.add("s_users_mysafe01"); List<String> policies = policyUtils.getPoliciesTobeCheked("users", "mysafe01"); assertEquals(expectedPolicies, policies); }