@Test public void shouldProduceDNWithTokenId() { String tokenId = "badger"; LDAPConfig constants = mock(LDAPConfig.class); given(constants.getTokenStoreRootSuffix()).willReturn(DN.rootDN()); LDAPDataConversion dataConversion = new LDAPDataConversion(); TokenAttributeConversion conversion = new TokenAttributeConversion(constants, dataConversion); DN dn = conversion.generateTokenDN(tokenId); verify(constants).getTokenStoreRootSuffix(); assertTrue(dn.toString().contains(tokenId)); }
public DN generateTokenDN(Token token) { return generateTokenDN(token.getTokenId()); }
TokenAttributeConversion { public DN generateTokenDN(Token token) { return generateTokenDN(token.getTokenId()); } }
TokenAttributeConversion { public DN generateTokenDN(Token token) { return generateTokenDN(token.getTokenId()); } @Inject  TokenAttributeConversion(LDAPConfig constants, LDAPDataConversion conversion); }
TokenAttributeConversion { public DN generateTokenDN(Token token) { return generateTokenDN(token.getTokenId()); } @Inject  TokenAttributeConversion(LDAPConfig constants, LDAPDataConversion conversion); Entry getEntry(Token token); Map<CoreTokenField, Object> mapFromEntry(Entry entry); Token tokenFromEntry(Entry entry); static Entry addObjectClass(Entry entry); static Entry stripObjectClass(Entry entry); DN generateTokenDN(Token token); DN generateTokenDN(String tokenId); }
TokenAttributeConversion { public DN generateTokenDN(Token token) { return generateTokenDN(token.getTokenId()); } @Inject  TokenAttributeConversion(LDAPConfig constants, LDAPDataConversion conversion); Entry getEntry(Token token); Map<CoreTokenField, Object> mapFromEntry(Entry entry); Token tokenFromEntry(Entry entry); static Entry addObjectClass(Entry entry); static Entry stripObjectClass(Entry entry); DN generateTokenDN(Token token); DN generateTokenDN(String tokenId);  }