zeppelin icon indicating copy to clipboard operation
zeppelin copied to clipboard

[ZEPPELIN-6201] Add unit tests for utils classes: ServerUtils, ExceptionUtils, CommandLineUtils, AnyOfRolesUserAuthorizationFilter

Open ParkGyeongTae opened this issue 6 months ago • 0 comments

What is this PR for?

This PR adds missing unit test coverage for several utility classes in the org.apache.zeppelin.utils package.
Previously, these classes had no dedicated test cases, which limited maintainability and regression detection.

The following classes are now covered with JUnit 5 and Mockito-based tests:

  • ServerUtils
  • ExceptionUtils
  • CommandLineUtils
  • AnyOfRolesUserAuthorizationFilter

All tests follow the “Given – When – Then” format for clarity and consistency.

What type of PR is it?

Improvement

Todos

  • [x] - Add ServerUtilsTest
  • [x] - Add ExceptionUtilsTest
  • [x] - Add CommandLineUtilsTest
  • [x] - Add AnyOfRolesUserAuthorizationFilterTest

What is the Jira issue?

  • Jira : https://issues.apache.org/jira/browse/ZEPPELIN/ZEPPELIN-6201

How should this be tested?

Run the following command:

./mvnw -pl zeppelin-server \
-Dtest=AnyOfRolesUserAuthorizationFilterTest,CommandLineUtilsTest,ExceptionUtilsTest,ServerUtilsTest \
test

Screenshots (if appropriate)

image

Questions:

  • Does the license files need to update? No.
  • Is there breaking changes for older versions? No.
  • Does this needs documentation? No.

ParkGyeongTae avatar Jun 14 '25 14:06 ParkGyeongTae