@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 PlcDriverManager(fakeClassLoader).getConnection("api-mock://some-cool-url"));
}