@Test(groups = "dnParser", dataProvider = "invalidDNs") public void testInvalidParsing(final String dn) throws Exception { try { DnParser.getValue(dn, ""); Assert.fail("Should have thrown IllegalArgumentException"); } catch (Exception e) { Assert.assertEquals(e.getClass(), IllegalArgumentException.class); } }
public static String getValue(final String dn, final String name) { final Collection<String> values = getValues(dn, name); if (values.isEmpty()) { return ""; } return values.iterator().next(); }
DnParser { public static String getValue(final String dn, final String name) { final Collection<String> values = getValues(dn, name); if (values.isEmpty()) { return ""; } return values.iterator().next(); } }
DnParser { public static String getValue(final String dn, final String name) { final Collection<String> values = getValues(dn, name); if (values.isEmpty()) { return ""; } return values.iterator().next(); } private  DnParser(); }
DnParser { public static String getValue(final String dn, final String name) { final Collection<String> values = getValues(dn, name); if (values.isEmpty()) { return ""; } return values.iterator().next(); } private  DnParser(); static Collection<String> getValues(final String dn, final String name); static String getValue(final String dn, final String name); static String substring(final String dn, final int beginIndex); static String substring(final String dn, final int beginIndex, final int endIndex); static List<LdapAttribute> convertDnToAttributes(final String dn); }
DnParser { public static String getValue(final String dn, final String name) { final Collection<String> values = getValues(dn, name); if (values.isEmpty()) { return ""; } return values.iterator().next(); } private  DnParser(); static Collection<String> getValues(final String dn, final String name); static String getValue(final String dn, final String name); static String substring(final String dn, final int beginIndex); static String substring(final String dn, final int beginIndex, final int endIndex); static List<LdapAttribute> convertDnToAttributes(final String dn);  }