use of keywhiz.KeywhizService in project keywhiz by square.
the class ServiceContext method create.
public static ServiceContext create() {
KeywhizService service = new KeywhizService();
Bootstrap<KeywhizConfig> bootstrap = new Bootstrap<>(service);
service.initialize(bootstrap);
ObjectMapper objectMapper = bootstrap.getObjectMapper().copy();
Validator validator = Validation.buildDefaultValidatorFactory().getValidator();
KeywhizConfig config = loadTestConfig(objectMapper, validator);
Environment environment = new Environment(bootstrap.getApplication().getName(), objectMapper, validator, bootstrap.getMetricRegistry(), bootstrap.getClassLoader());
return new ServiceContext(service, bootstrap, config, environment);
}
use of keywhiz.KeywhizService in project keywhiz by square.
the class LdapLookupConfigTest method setup.
@Before
public void setup() {
KeywhizService service = new KeywhizService();
bootstrap = new Bootstrap<>(service);
service.initialize(bootstrap);
}
Aggregations