aws / aws-iot-device-sdk-java

Java SDK for connecting to AWS IoT from a device.
https://aws.amazon.com/iot/sdk/
Apache License 2.0
211 stars 168 forks source link

Java Unit Tests #179

Closed xiazhvera closed 2 years ago

xiazhvera commented 2 years ago

Description of changes: Added the Unit tests and update the plugins to compatible with JDK17

  1. Upgrade lombok to 1.18.20
  2. Upgrade mockito to 2.25.0 ( We didn't upgrade mockito3 because mockito3 needs Java8) a. Matcher: any() vs nullable(). Though documents says any() matches anything includes null, but it does not. We uses nullable instead to allow passing null value in the test. Fix other matcher errors. b. Mockito 2 introduce strict stubbing which does not apply in Mockito1, we use lenient for a quick work around. c. FieldSetter is deprecated from Mochito2.x, use JUnit Field instead
  3. Added GitHub CI for this repo

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.