Skip to content

Chore: migrate tests from jmockit to mockito to include test coverage in sonar report#229

Merged
mcook42 merged 98 commits into
developfrom
mcook42/remove-jmockit
Jun 10, 2026
Merged

Chore: migrate tests from jmockit to mockito to include test coverage in sonar report#229
mcook42 merged 98 commits into
developfrom
mcook42/remove-jmockit

Conversation

@mcook42

@mcook42 mcook42 commented Apr 25, 2026

Copy link
Copy Markdown

PR Details

Description

This pull request removes JMockit from the project entirely and migrates every test that used it to Mockito, the mocking framework that ships with Spring Boot Test by default. The JMockit Maven dependency and its -javaagent Surefire argument are deleted, and roughly forty test classes across jpo-ode-svcs, jpo-ode-core, jpo-ode-plugins, and jpo-ode-common have been rewritten to use Mockito idioms (@Mock, @InjectMocks, when(...).thenReturn(...), verify(...), mockStatic, mockConstruction).

A small production change was needed to make one class testable without JMockit's constructor mocking: SnmpSession now receives its Snmp and TransportMapping collaborators through new SnmpSessionFactory and TransportMappingFactory Spring beans rather than constructing them directly. Two pre-existing tests that depended on JMockit's ability to mock unmockable third-party constructs (a logger field and an IOException thrown from a final method) have been removed because they cannot be expressed in Mockito, and the scenarios they covered are not reachable through the public API.

Related Issue

N/A.

Motivation and Context

JMockit has not had a meaningful release in years, and its bytecode-rewriting Java agent is incompatible with the JaCoCo agent that SonarCloud relies on for coverage. As long as JMockit was on the classpath, any test it touched was excluded from our SonarCloud coverage numbers, resulting in an artificially low and misleading coverage signal. Moving these tests to Mockito both removes a dead dependency and makes the affected code visible again in coverage analysis. Mockito is already a transitive dependency of spring-boot-starter-test, so this change reduces our dependency footprint rather than expanding it.

How Has This Been Tested?

The full Maven test suite (mvn clean verify) was run locally and passed. CI runs the same suite on every push to this branch.

Types of changes

  • Defect fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that cause existing functionality to change)

Checklist:

  • I have added any new packages to the sonar-scanner.properties file
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
    ODE Contributing Guide
  • I have added tests to cover my changes.
  • All new and existing tests passed.

…ad of EmbeddedKafkaZKBroker for transition to kraft instead of zookeeper
…ner, replace EmbeddedKafkaHolder with CountDownLatch for async validation
…ner, replace EmbeddedKafkaHolder with CountDownLatch for async validation
…er, replace EmbeddedKafkaHolder with CountDownLatch for async validation
…ner, replace EmbeddedKafkaHolder with CountDownLatch for async validation
…@KafkaListener, replace EmbeddedKafkaHolder with CountDownLatch for async validation
…@KafkaListener, remove EmbeddedKafkaHolder usage
…ner in all tests, refactor tests to use CountDownLatch for async validation
…ntrollerTest and change order of creation of consumers
…rConfigTest and update topic handling logic
…on of isCertPresent field"

This reverts commit 65a81c0.
- TimDeleteController: add Javadoc to constructor and deleteTim,
  break long log line, restore license-header trailing whitespace
  to match master (drops empty-line JavadocParagraph noise)
- TimQueryController: add ending period to bulkQuery Javadoc summary
@mcook42 mcook42 marked this pull request as ready for review April 27, 2026 21:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the legacy JMockit-based testing approach (and its Java agent) and migrates affected tests to Mockito so that JaCoCo/Sonar coverage can include the previously excluded test suite. It also introduces a small SNMP construction seam (factory injection) to replace JMockit constructor-mocking needs.

Changes:

  • Removed the JMockit Maven dependency and Surefire -javaagent configuration.
  • Migrated a large set of tests from JMockit idioms to Mockito (including static and constructor mocking).
  • Refactored SNMP session creation to be injectable via new factory interfaces / Spring configuration to support Mockito-based tests.

Reviewed changes

Copilot reviewed 49 out of 49 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
pom.xml Removes JMockit dependency and its Surefire agent configuration.
jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/traveler/TimQueryControllerTest.java Migrates TIM query controller tests from JMockit to Mockito; introduces SnmpSessionFactory mocking.
jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/traveler/TimDepositControllerTest.java Replaces JMockit static/constructor mocking with Mockito static mocking.
jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/traveler/TimDeleteControllerTest.java Migrates TIM delete controller tests to Mockito and adapts to SnmpSessionFactory.
jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/stomp/WebSocketConfigTest.java Converts JMockit verifications to Mockito verify(...).
jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/stomp/StompControllerTest.java Migrates controller tests to Mockito + JUnit Jupiter.
jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/snmp/SnmpSessionTest.java Updates SNMP session tests to Mockito; adds coverage for transport-construction failure via factory.
jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/rsuHealth/RsuSnmpTest.java Migrates RSU SNMP tests to Mockito and adds interaction verification.
jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/rsuHealth/RsuHealthControllerTest.java Replaces JMockit constructor/static mocking with Mockito mockConstruction/mockStatic.
jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/pdm/PdmUtilTest.java Converts PDM util test to Mockito.
jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/pdm/PdmControllerTest.java Migrates controller tests to Mockito static/constructor mocking for JsonUtils and SnmpSession.
jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/pdm/J2735PdmRequestTest.java Removes JMockit usage; uses direct instantiation under JUnit Jupiter.
jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/SystemConfigTest.java Updates assertions to JUnit Jupiter.
jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/OdePropertiesControllerTest.java Migrates to Mockito + JUnit Jupiter and removes JMockit expectations.
jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/traveler/TimQueryController.java Injects SnmpSessionFactory instead of direct new SnmpSession(...).
jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/traveler/TimDeleteController.java Injects SnmpSessionFactory instead of direct new SnmpSession(...).
jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/snmp/TransportMappingFactory.java New functional interface to abstract TransportMapping creation for testability.
jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/snmp/SnmpSessionFactory.java New functional interface to abstract SnmpSession creation for controller testability.
jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/snmp/SnmpSession.java Adds a transport-factory constructor to avoid constructor mocking.
jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/snmp/SnmpConfig.java Registers a Spring bean providing the default SnmpSessionFactory.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/builders/WeatherProbeBuilderTest.java Migrates static builder stubbing to Mockito static mocking.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/builders/VehicleSafetyExtensionsBuilderTest.java Migrates builder static mocking to Mockito.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/builders/TravelerMessageFromHumanToAsnConverterTest.java Removes JMockit logger mocking setup.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/builders/TimeStampConverterTest.java Removes JMockit logger mocking setup; updates to JUnit Jupiter assertions.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/builders/SupplementalVehicleExtensionsBuilderTest.java Migrates multiple static builder stubs to Mockito static mocking.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/builders/Position3DBuilderTest.java Migrates static helper stubs to Mockito static mocking.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/builders/EventDescriptionBuilderTest.java Migrates static helper stubs to Mockito static mocking.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/builders/BsmPart2ContentBuilderTest.java Replaces JMockit capturing with managed Mockito static mocks and verification.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/builders/BsmCoreDataBuilderTest.java Replaces JMockit capturing with managed Mockito static mocks.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/J2735VehicleStatusRequestTest.java Removes JMockit; uses direct instantiation.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/J2735TransmissionAndSpeedTest.java Removes JMockit; updates to JUnit Jupiter assertions.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/J2735TrailerUnitDescriptionTest.java Removes JMockit; updates to JUnit Jupiter assertions.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/J2735TrailerDataTest.java Removes JMockit; uses direct instantiation.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/J2735SupplementalVehicleExtensionsTest.java Removes JMockit; uses direct instantiation.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/J2735SpeedProfileTest.java Removes JMockit; uses direct instantiation.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/J2735SpecialVehicleExtensionTest.java Removes JMockit; uses direct instantiation.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/J2735RTCMPackageTest.java Removes JMockit; uses direct instantiation.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/J2735ProbeDataManagmentTest.java Removes JMockit; uses direct instantiation.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/J2735PathHistoryPointTest.java Removes JMockit; uses direct instantiation.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/J2735PathHistoryPointListTest.java Removes JMockit; uses direct instantiation.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/J2735FullPositionVectorTest.java Removes JMockit; uses direct instantiation.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/J2735EventDescriptionTest.java Removes JMockit; uses direct instantiation.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/J2735EmergencyDetailsTest.java Removes JMockit; uses direct instantiation.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/J2735ChoiceTest.java Removes a JMockit-only exception test and updates to JUnit Jupiter assertions.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/J2735BsmTest.java Removes JMockit; uses direct instantiation.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/DdsAdvisoryDetailsTest.java Removes JMockit instantiation; uses direct instantiation (still has some legacy imports).
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/generic/SituationDataWarehouseTest.java Migrates to JUnit Jupiter assertions; removes JMockit.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/generic/RoadSideUnitTest.java Migrates to JUnit Jupiter assertions; removes JMockit.
jpo-ode-core/src/test/java/us/dot/its/jpo/ode/snmp/SNMPTest.java Migrates to JUnit Jupiter assertions; removes JMockit/JUnit4 patterns.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pom.xml
…rces

Replaced manual `snmp.close()` calls with try-with-resources in `RsuHealthController` and adjusted relevant tests. Removed redundant `close()` verifications in `RsuSnmpTest` as the new approach guarantees resource cleanup.
Comment thread jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/heartbeat/RsuHealthController.java Outdated
Comment thread jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/heartbeat/RsuHealthController.java Outdated
Comment thread jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/heartbeat/RsuHealthController.java Outdated
Comment thread jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/heartbeat/RsuHealthController.java Outdated
Comment thread jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/heartbeat/RsuHealthController.java Outdated
Comment thread jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/heartbeat/RsuHealthController.java Outdated
Comment thread jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/heartbeat/RsuHealthController.java Outdated
Comment thread jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/heartbeat/RsuHealthController.java Outdated
Comment thread jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/heartbeat/RsuHealthController.java Outdated
Comment thread jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/heartbeat/RsuHealthController.java Outdated
@mcook42 mcook42 marked this pull request as draft April 29, 2026 18:58
Fixes checkstyle IndentationCheck violations flagged by reviewdog on PR
#229. The try-with-resources refactor introduced 4-space indentation for
the try body; Google style (basicOffset=2) requires 2 spaces per level.
Reformatted the entire class for consistency and split the overlong
method signature onto separate lines.
…at method

Fixes missing-Javadoc and empty-line-before-tag checkstyle violations
reported by the reviewdog bot on PR #229.
Snmp snmp = new Snmp(transport);
USM usm = new USM(SecurityProtocols.getInstance(), new OctetString(MPv3.createLocalEngineID()), 0);
TransportMapping transport = new DefaultUdpTransportMapping();
try (Snmp snmp = new Snmp(transport)) {

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: I added this try-with-resources block to resolve a resource leak issue found during the test framework migration. It isn't necessary for the jmockit removal, but it is necessary to prevent resource leaks in the running application when an exception is thrown during SNMP command execution in RsuSnmp.sendSnmpV3Request

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes JMockit usage across the codebase by migrating affected unit tests to Mockito (including static/construction mocking) so JaCoCo/Sonar can report coverage, and introduces a small SNMP session-construction seam to keep SNMP-related controllers testable without constructor mocking.

Changes:

  • Removed the JMockit dependency and Surefire -javaagent configuration from the root pom.xml.
  • Rewrote a large set of tests from JMockit idioms to Mockito/JUnit 5 idioms.
  • Updated SNMP-related production code to inject SnmpSession creation via a SnmpSessionFactory, and added supporting factory/config types.

Reviewed changes

Copilot reviewed 51 out of 51 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
pom.xml Removes JMockit dependency and Surefire javaagent configuration.
jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/traveler/TimQueryControllerTest.java Migrates TIM query controller tests from JMockit to Mockito.
jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/traveler/TimDepositControllerTest.java Migrates TIM deposit controller tests to Mockito static mocking.
jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/traveler/TimDeleteControllerTest.java Migrates TIM delete controller tests to Mockito with injected factory.
jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/stomp/WebSocketConfigTest.java Replaces JMockit verifications with Mockito verify calls.
jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/stomp/StompControllerTest.java Migrates to Mockito extension + JUnit 5 assertions.
jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/snmp/SnmpSessionTest.java Updates SNMP session tests to use a transport factory seam instead of constructor mocking.
jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/rsuHealth/RsuSnmpTest.java Migrates RSU SNMP unit tests from JMockit to Mockito.
jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/rsuHealth/RsuHealthControllerTest.java Migrates heartbeat tests using Mockito static/construction mocking.
jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/pdm/PdmUtilTest.java Migrates PDM util tests to Mockito.
jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/pdm/PdmControllerTest.java Migrates PDM controller tests using Mockito static/construction mocking.
jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/pdm/J2735PdmRequestTest.java Removes JMockit @Tested usage; uses direct construction.
jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/SystemConfigTest.java Converts assertions to JUnit 5 style.
jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/OdePropertiesControllerTest.java Migrates to Mockito extension + stubbing for properties.
jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/traveler/TimQueryController.java Injects SnmpSessionFactory and uses it for session creation.
jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/traveler/TimDeleteController.java Injects SnmpSessionFactory and uses it for session creation.
jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/snmp/TransportMappingFactory.java Adds a transport factory interface to enable constructor-failure testing.
jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/snmp/SnmpSessionFactory.java Adds a session factory interface for injection/testing.
jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/snmp/SnmpSession.java Adds constructor overload using TransportMappingFactory.
jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/snmp/SnmpConfig.java Provides a Spring bean for SnmpSessionFactory.
jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/heartbeat/RsuSnmp.java Stops closing Snmp inside helper (caller now owns lifecycle).
jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/heartbeat/RsuHealthController.java Uses try-with-resources to manage Snmp lifecycle and adds docs.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/builders/WeatherProbeBuilderTest.java Migrates static builder mocking to Mockito mockStatic.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/builders/VehicleSafetyExtensionsBuilderTest.java Migrates static builder mocking and updates assertion style.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/builders/TravelerMessageFromHumanToAsnConverterTest.java Removes logger mocking previously done with JMockit.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/builders/TimeStampConverterTest.java Removes JMockit logger mocking and updates assertions.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/builders/SupplementalVehicleExtensionsBuilderTest.java Migrates multiple static builder mocks to Mockito.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/builders/Position3DBuilderTest.java Migrates static builder mocking to Mockito and updates assertions.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/builders/EventDescriptionBuilderTest.java Migrates static CodecUtils mocking and updates assertion ordering.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/builders/BsmPart2ContentBuilderTest.java Reworks capturing/verifications into Mockito static mocks + verify.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/builders/BsmCoreDataBuilderTest.java Adds lifecycle-managed Mockito static mocks for collaborating builders.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/J2735VehicleStatusRequestTest.java Replaces JMockit @Tested with direct instantiation and JUnit 5 assertions.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/J2735TransmissionAndSpeedTest.java Normalizes header formatting and uses JUnit 5 assertions.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/J2735TrailerUnitDescriptionTest.java Replaces JMockit @Tested with direct instantiation and JUnit 5 assertions.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/J2735TrailerDataTest.java Replaces JMockit @Tested with direct instantiation.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/J2735SupplementalVehicleExtensionsTest.java Replaces JMockit @Tested with direct instantiation.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/J2735SpeedProfileTest.java Replaces JMockit @Tested with direct instantiation.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/J2735SpecialVehicleExtensionTest.java Replaces JMockit @Tested with direct instantiation.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/J2735RTCMPackageTest.java Replaces JMockit @Tested with direct instantiation.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/J2735ProbeDataManagmentTest.java Replaces JMockit @Tested with direct instantiation.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/J2735PathHistoryPointTest.java Replaces JMockit @Tested with direct instantiation.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/J2735PathHistoryPointListTest.java Replaces JMockit @Tested with direct instantiation.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/J2735FullPositionVectorTest.java Replaces JMockit @Tested with direct instantiation.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/J2735EventDescriptionTest.java Replaces JMockit @Tested with direct instantiation.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/J2735EmergencyDetailsTest.java Replaces JMockit @Tested with direct instantiation.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/J2735ChoiceTest.java Removes a JMockit-based exception test that depended on mocking logging internals.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/J2735BsmTest.java Replaces JMockit mocking with direct instantiation + JUnit 5 assertions.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/j2735/DdsAdvisoryDetailsTest.java Removes JMockit @Tested usage while keeping test behavior.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/generic/SituationDataWarehouseTest.java Replaces JMockit @Tested with direct instantiation and JUnit 5 assertions.
jpo-ode-plugins/src/test/java/us/dot/its/jpo/ode/plugin/generic/RoadSideUnitTest.java Migrates to JUnit 5 assertions and removes JMockit @Tested.
jpo-ode-core/src/test/java/us/dot/its/jpo/ode/snmp/SNMPTest.java Updates to JUnit 5 assertions and removes unused JMockit/JUnit4 annotations.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

ResponseEvent responseEvent;
try {
responseEvent = snmp.send(pdu, target);
snmp.close();

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: this was removed as the try-with-resources block we added in RsuHealthController now manages the lifecycle of the SNMP resource in both success and error conditions

@mcook42 mcook42 marked this pull request as ready for review April 29, 2026 19:36
Base automatically changed from pmonington/upgrade-spring to develop June 5, 2026 20:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 52 out of 52 changed files in this pull request and generated 5 comments.

@pmonington pmonington left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@Russ-Garrett-Trihydro Russ-Garrett-Trihydro left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I found an issue with testing Kafka Streams in jpo-ode-svcs, but it isn't related to the changes in this PR.

@mcook42 mcook42 merged commit f404dd3 into develop Jun 10, 2026
7 checks passed
@mcook42 mcook42 deleted the mcook42/remove-jmockit branch June 10, 2026 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants