@Test public void test() { final String dn = new String(); context.checking(new Expectations() { { allowing(ctx).getNameInNamespace(); will(returnValue(dn)); } }); LdapGroup result = (LdapGroup) sut.mapFromContext(ctx); assertEquals(dn, result.getDistinguishedName().toCompactString()); context.assertIsSatisfied(); }
@Override public Object mapFromContext(final Object inCtx) { DirContextAdapter dir = (DirContextAdapter) inCtx; return new LdapGroup(new DistinguishedName(dir.getNameInNamespace())); }
LdapToLdapGroupMapper implements ContextMapper { @Override public Object mapFromContext(final Object inCtx) { DirContextAdapter dir = (DirContextAdapter) inCtx; return new LdapGroup(new DistinguishedName(dir.getNameInNamespace())); } }
LdapToLdapGroupMapper implements ContextMapper { @Override public Object mapFromContext(final Object inCtx) { DirContextAdapter dir = (DirContextAdapter) inCtx; return new LdapGroup(new DistinguishedName(dir.getNameInNamespace())); }  }
LdapToLdapGroupMapper implements ContextMapper { @Override public Object mapFromContext(final Object inCtx) { DirContextAdapter dir = (DirContextAdapter) inCtx; return new LdapGroup(new DistinguishedName(dir.getNameInNamespace())); }  @Override Object mapFromContext(final Object inCtx); }
LdapToLdapGroupMapper implements ContextMapper { @Override public Object mapFromContext(final Object inCtx) { DirContextAdapter dir = (DirContextAdapter) inCtx; return new LdapGroup(new DistinguishedName(dir.getNameInNamespace())); }  @Override Object mapFromContext(final Object inCtx);  }