### Question:
ManagedRangerAuthorizer extends RangerNiFiAuthorizer implements ManagedAuthorizer { @Override public void inheritFingerprint(String fingerprint) throws AuthorizationAccessException { if (StringUtils.isBlank(fingerprint)) { return; } final String userGroupFingerprint = parseFingerprint(fingerprint); if (StringUtils.isNotBlank(userGroupFingerprint) && userGroupProvider instanceof ConfigurableUserGroupProvider) { ((ConfigurableUserGroupProvider) userGroupProvider).inheritFingerprint(userGroupFingerprint); } }  @Override void initialize(AuthorizerInitializationContext initializationContext); @Override void onConfigured(AuthorizerConfigurationContext configurationContext); @Override AccessPolicyProvider getAccessPolicyProvider(); @Override String getFingerprint(); @Override void inheritFingerprint(String fingerprint); @Override void checkInheritability(String proposedFingerprint);  }### Answer:
@Test public void testInheritEmptyFingerprint() throws Exception { final ConfigurableUserGroupProvider userGroupProvider = mock(ConfigurableUserGroupProvider.class); final ManagedRangerAuthorizer managedRangerAuthorizer = getStandardManagedAuthorizer(userGroupProvider); managedRangerAuthorizer.inheritFingerprint(EMPTY_FINGERPRINT); verify(userGroupProvider, times(0)).inheritFingerprint(anyString()); }
@Test(expected = AuthorizationAccessException.class) public void testInheritInvalidFingerprint() throws Exception { final ConfigurableUserGroupProvider userGroupProvider = mock(ConfigurableUserGroupProvider.class); final ManagedRangerAuthorizer managedRangerAuthorizer = getStandardManagedAuthorizer(userGroupProvider); managedRangerAuthorizer.inheritFingerprint("not a valid fingerprint"); }
@Test public void testInheritNonEmptyFingerprint() throws Exception { final ConfigurableUserGroupProvider userGroupProvider = mock(ConfigurableUserGroupProvider.class); final ManagedRangerAuthorizer managedRangerAuthorizer = getStandardManagedAuthorizer(userGroupProvider); managedRangerAuthorizer.inheritFingerprint(NON_EMPTY_FINGERPRINT); verify(userGroupProvider, times(1)).inheritFingerprint(TENANT_FINGERPRINT); }