@Test
    public void getDuplicateDriver() throws MalformedURLException {
        // Save and replace the context classloader as we need to force the ServiceLoader to
        // use a different service file.
        ClassLoader originalClassloader = Thread.currentThread().getContextClassLoader();
        URL[] urls = new URL[1];
        urls[0] = new File("src/test/resources/test").toURI().toURL();
        ClassLoader fakeClassLoader = new URLClassLoader(urls, originalClassloader);

        // expect exception
        assertThrows(IllegalStateException.class,
            () -> new DefaultPlcDriverManager(fakeClassLoader).getConnection("api-mock://some-cool-url"));
    }
In this test the PlcDriverManager will be configured with a service list that
contains multiple implementation instances of the same protocol. This should result in
an error.

@throws MalformedURLException something went wrong
@throws PlcConnectionException something went wrong
plc4j/api/src/test/java/org/apache/plc4x/java/PlcDriverManagerTest.java