public static String getDbTypeFromDataSource(DataSource dataSource) throws SQLException {
        try (Connection con = dataSource.getConnection()) {
            DatabaseMetaData metaData = con.getMetaData();
            return metaData.getDatabaseProductName();
        }
    }
@Test
    public void testGetDbTypeFromDataSource() throws SQLException {
        Connection connection = Mockito.mock(Connection.class);
        DatabaseMetaData databaseMetaData = Mockito.mock(DatabaseMetaData.class);
        when(connection.getMetaData()).thenReturn(databaseMetaData);
        when(databaseMetaData.getDatabaseProductName()).thenReturn("test");
        MockDataSource mockDataSource = new MockDataSource();
        mockDataSource.setConnection(connection);
        Assertions.assertEquals(DbStateMachineConfig.getDbTypeFromDataSource(mockDataSource), "test");
    }