@Test
    public void getExistingDriverWithAuthenticationTest() throws PlcException {
        PlcUsernamePasswordAuthentication authentication =
            new PlcUsernamePasswordAuthentication("user", "pass");
        MockPlcConnection mockConnection = (MockPlcConnection) new DefaultPlcDriverManager().getConnection("api-mock://some-cool-url", authentication);

        assertThat(mockConnection.getAuthentication(), notNullValue());
        assertThat(mockConnection.getAuthentication(), instanceOf(PlcUsernamePasswordAuthentication.class));
        assertThat(mockConnection.isConnected(), is(true));
    }
Tries to get the mock plc driver with authentication which is part of this testsuite.

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