package com.cloudhandson.ddsbackoffice.service;

import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;

import org.junit.jupiter.api.Test;

class DdsMcpJdbcApiTest {

  @Test
  void shipsTheOracleJdbcDdsContextApiNeededByTheMcpExecutor() {
    assertDoesNotThrow(() -> {
      Class<?> context = Class.forName("oracle.jdbc.EndUserSecurityContext");
      context.getMethod("createWithName", CharSequence.class, String.class, CharSequence.class);
      Class<?> connection = Class.forName("oracle.jdbc.OracleConnection");
      connection.getMethod("setEndUserSecurityContext", context);
      connection.getMethod("clearEndUserSecurityContext");
    });
  }
}
