### Question:
RangerAuthorizer implements ManagedAuthorizer, AuthorizationAuditor { @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 AuthorizationResult authorize(final AuthorizationRequest request); @Override void auditAccessAttempt(final AuthorizationRequest request, final AuthorizationResult result); @Override void preDestruction(); @AuthorizerContext void setRegistryProperties(final NiFiRegistryProperties properties); @Override String getFingerprint(); @Override void inheritFingerprint(String fingerprint); @Override void checkInheritability(String proposedFingerprint); @Override AccessPolicyProvider getAccessPolicyProvider();  }### Answer:
@Test public void testInheritEmptyFingerprint() { final ConfigurableUserGroupProvider userGroupProvider = mock(ConfigurableUserGroupProvider.class); final AuthorizerConfigurationContext configurationContext = createMockConfigContext(); setup(mock(NiFiRegistryProperties.class), userGroupProvider, configurationContext); authorizer.inheritFingerprint(EMPTY_FINGERPRINT); verify(userGroupProvider, times(0)).inheritFingerprint(anyString()); }
@Test(expected = AuthorizationAccessException.class) public void testInheritInvalidFingerprint() { final ConfigurableUserGroupProvider userGroupProvider = mock(ConfigurableUserGroupProvider.class); final AuthorizerConfigurationContext configurationContext = createMockConfigContext(); setup(mock(NiFiRegistryProperties.class), userGroupProvider, configurationContext); authorizer.inheritFingerprint("not a valid fingerprint"); }
@Test public void testInheritNonEmptyFingerprint() { final ConfigurableUserGroupProvider userGroupProvider = mock(ConfigurableUserGroupProvider.class); final AuthorizerConfigurationContext configurationContext = createMockConfigContext(); setup(mock(NiFiRegistryProperties.class), userGroupProvider, configurationContext); authorizer.inheritFingerprint(NON_EMPTY_FINGERPRINT); verify(userGroupProvider, times(1)).inheritFingerprint(TENANT_FINGERPRINT); }