use of org.apache.knox.gateway.identityasserter.common.function.UsernameFunctionDescriptor in project knox by apache.
the class UsernameFunctionDescriptorTest method testName.
@Test
public void testName() throws Exception {
UsernameFunctionDescriptor descriptor = new UsernameFunctionDescriptor();
assertThat(descriptor.name(), is("username"));
}
use of org.apache.knox.gateway.identityasserter.common.function.UsernameFunctionDescriptor in project knox by apache.
the class UsernameFunctionDescriptorTest method testServiceLoader.
@Test
public void testServiceLoader() throws Exception {
ServiceLoader loader = ServiceLoader.load(UrlRewriteFunctionDescriptor.class);
for (Object object : loader) {
if (object instanceof UsernameFunctionDescriptor) {
return;
}
}
fail("Failed to find UsernameFunctionDescriptor via service loader.");
}
Aggregations