zeppelin
zeppelin copied to clipboard
[ZEPPELIN-6201] Add unit tests for utils classes: ServerUtils, ExceptionUtils, CommandLineUtils, AnyOfRolesUserAuthorizationFilter
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:
ServerUtilsExceptionUtilsCommandLineUtilsAnyOfRolesUserAuthorizationFilter
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)
Questions:
- Does the license files need to update? No.
- Is there breaking changes for older versions? No.
- Does this needs documentation? No.