use of org.apache.servicecomb.core.BootListener.BootEvent in project java-chassis by ServiceComb.
the class TestAuthHandlerBoot method testGenerateRSAKey.
@Test
public void testGenerateRSAKey() {
MicroserviceInstance microserviceInstance = new MicroserviceInstance();
Microservice microservice = new Microservice();
microservice.setInstance(microserviceInstance);
AuthHandlerBoot authHandlerBoot = new AuthHandlerBoot();
BootEvent bootEvent = new BootEvent();
bootEvent.setEventType(BootListener.EventType.BEFORE_REGISTRY);
authHandlerBoot.onBootEvent(bootEvent);
Assert.assertNotNull(RSAKeypair4Auth.INSTANCE.getPrivateKey());
Assert.assertNotNull(RSAKeypair4Auth.INSTANCE.getPublicKey());
}
Aggregations