@Test
public void authorize() {

	Mockito.when(session.principal()).thenReturn(customPrincipal);
	Mockito.when(customPrincipal.getOauthBearerTokenJwt()).thenReturn(jwt);
	Set<String> set = new HashSet<>();
	set.add("urn:kafka:topic:test:write");
	Mockito.when(jwt.scope()).thenReturn(set);
	Mockito.when(resource.name()).thenReturn("test");
	Mockito.when(resource.resourceType()).thenReturn(ResourceType.fromString("topic"));
	Mockito.when(operation.toJava()).thenReturn(AclOperation.fromString("write"));
	boolean result = customAuthorizer.authorize(session, operation, resource);
	assertTrue(result);
}