List of usage examples for javax.security.sasl SaslServer getClass
@HotSpotIntrinsicCandidate public final native Class<?> getClass();
From source file:org.wildfly.security.sasl.entity.EntityTest.java
@Test public void testServerAuthIndirect_Server() throws Exception { Map<String, Object> props = new HashMap<String, Object>(); // No properties are set, an appropriate EntitySaslServer should be returned SaslServer server = Sasl.createSaslServer(SaslMechanismInformation.Names.IEC_ISO_9798_U_RSA_SHA1_ENC, "TestProtocol", "TestServer", props, null); assertEquals(EntitySaslServer.class, server.getClass()); assertEquals(SaslMechanismInformation.Names.IEC_ISO_9798_U_RSA_SHA1_ENC, server.getMechanismName()); // If we set SERVER_AUTH to true even though a unilateral mechanism is specified, no server should be returned props.put(Sasl.SERVER_AUTH, Boolean.toString(true)); server = Sasl.createSaslServer(SaslMechanismInformation.Names.IEC_ISO_9798_U_RSA_SHA1_ENC, "TestProtocol", "TestServer", props, null); assertNull(server);//from w ww .j a va 2 s . co m }