InfinispanContext implements Disposable { protected static SaslQop[] buildSaslQop(String saslQop) { return Arrays.asList(saslQop.split(",")).stream() .map(InfinispanContext::toSaslQop) .toArray(size -> new SaslQop[size]); } private  InfinispanContext(Map<String, String> properties); static InfinispanContext getInstance(); void retrieveProbufSchemas(); RemoteCache<String, KObject> getCache(String index); List<String> getTypes(String index); void addProtobufSchema(String clusterId,
                                  Schema schema); void loadProtobufSchema(RemoteCache<String, String> metadataCache); @Override void dispose(); List<String> getIndices(); Optional<Schema> getSchema(String clusterId); void addSchema(Schema schema); boolean isAlive(); void deleteCache(String index); void observeInitialization(Runnable runnable); static final String SASL_MECHANISM; }
@Test public void testBiuildSaslQop() { { SaslQop[] sasl = InfinispanContext.buildSaslQop("auth"); assertThat(sasl).extracting(SaslQop::toString).contains("auth"); } { SaslQop[] sasl = InfinispanContext.buildSaslQop(" AUTH , auth-int,"); assertThat(sasl).extracting(SaslQop::toString).contains("auth", "auth-int"); } { try { SaslQop[] sasl = InfinispanContext.buildSaslQop("auths"); fail("auths is an invalid option"); } catch (InfinispanException e) { logger.info(e.getMessage()); } } }