SecurityEntryPoint { public void onPolicySaved(@Observes AuthorizationPolicySavedEvent event) { AuthorizationPolicy policy = event.getPolicy(); permissionManager.setAuthorizationPolicy(policy); }  @PostConstruct void init(); void onPolicySaved(@Observes AuthorizationPolicySavedEvent event);  }
@Test public void onPolicySavedTest() { final AuthorizationPolicy policy = mock(AuthorizationPolicy.class); final AuthorizationPolicySavedEvent event = new AuthorizationPolicySavedEvent(policy); securityEntryPoint.onPolicySaved(event); verify(permissionManager).setAuthorizationPolicy(policy); }