AuthTicketGenerator extends ComponentSupport { public String generate(final int size) { byte[] bytes = randomBytes.generate(size); return encode(bytes); } @Inject  AuthTicketGenerator(final RandomBytesGenerator randomBytes,
                             @Named(CPREFIX + ".defaultSize:-66}") final int defaultSize); String generate(final int size); String generate();  }
@Test public void generateWithDefault() { AuthTicketGenerator generator = new AuthTicketGenerator(new RandomBytesGeneratorImpl(new CryptoHelperImpl()), 16); String token = generator.generate(); log(token); assertNotNull(token); }