@Override
    public String get(final Scope scope, final ConnectionSession connectionSession, final MySQLSystemVariable variable) {
        if (Scope.GLOBAL == scope) {
            return variable.getDefaultValue();
        }
        return connectionSession.isReadOnly() ? "1" : "0";
    }
@Test
    void assertGetSessionValue() {
        ConnectionSession connectionSession = new ConnectionSession(TypedSPILoader.getService(DatabaseType.class, "MySQL"), new DefaultAttributeMap());
        assertThat(new TransactionReadOnlyValueProvider().get(Scope.SESSION, connectionSession, MySQLSystemVariable.TX_READ_ONLY), is("0"));
        assertThat(new TransactionReadOnlyValueProvider().get(Scope.SESSION, connectionSession, MySQLSystemVariable.TRANSACTION_READ_ONLY), is("0"));
        connectionSession.setReadOnly(true);
        assertThat(new TransactionReadOnlyValueProvider().get(Scope.SESSION, connectionSession, MySQLSystemVariable.TX_READ_ONLY), is("1"));
        assertThat(new TransactionReadOnlyValueProvider().get(Scope.SESSION, connectionSession, MySQLSystemVariable.TRANSACTION_READ_ONLY), is("1"));
    }