@Test
        public void connect_resolveAlias_works() throws PlcConnectionException, OPMException {
            SimpleAliasRegistry registry = new SimpleAliasRegistry();
            registry.register("alias", "real_tag");

            // Mock
            DefaultPlcDriverManager driverManager = new DefaultPlcDriverManager();
            MockConnection connection = (MockConnection) driverManager.getConnection("mock:test");
            MockDevice mockDevice = Mockito.mock(MockDevice.class);
            when(mockDevice.read(any())).thenReturn(new DefaultPlcResponseItem<>(PlcResponseCode.OK, new PlcSTRING("value")));
            connection.setDevice(mockDevice);

            PlcEntityManager entityManager = new PlcEntityManager(driverManager, registry);
            entityManager.connect(AliasEntity.class, "mock:test");

            // Assert that "tag" was queried
            verify(mockDevice, times(1)).read(eq("real_tag"));
        }
Class is private, so EntityManager has no access to it

@throws OPMException
plc4j/tools/opm/src/test/java/org/apache/plc4x/java/opm/PlcEntityManagerTest.java