Commit Graph

66 Commits

Author SHA1 Message Date
YuCheng Hu a51b7b55d9
Merge remote-tracking branch 'Baeldung/master' into active_mq
# Conflicts:
#	.gitignore
#	LICENSE
#	README.md
#	core-java-modules/README.md
#	core-java-modules/core-java-11/README.md
#	core-java-modules/core-java-11/pom.xml
#	core-java-modules/core-java-8/README.md
#	core-java-modules/core-java-8/pom.xml
#	core-java-modules/core-java-8/src/main/resources/logback.xml
#	core-java-modules/core-java-annotations/README.md
#	core-java-modules/core-java-annotations/pom.xml
#	core-java-modules/core-java-collections-2/README.md
#	core-java-modules/core-java-collections-2/pom.xml
#	core-java-modules/core-java-collections-3/README.md
#	core-java-modules/core-java-collections-3/pom.xml
#	core-java-modules/core-java-collections-conversions-2/README.md
#	core-java-modules/core-java-collections-conversions-2/pom.xml
#	core-java-modules/core-java-collections-conversions/README.md
#	core-java-modules/core-java-collections-conversions/pom.xml
#	core-java-modules/core-java-collections-list/README.md
#	core-java-modules/core-java-collections-list/pom.xml
#	core-java-modules/core-java-collections/pom.xml
#	core-java-modules/core-java-datetime-conversion/README.md
#	core-java-modules/core-java-datetime-conversion/pom.xml
#	core-java-modules/core-java-datetime-conversion/src/test/java/com/baeldung/datetime/ConvertInstantToTimestampUnitTest.java
#	core-java-modules/core-java-io-2/pom.xml
#	core-java-modules/core-java-io/README.md
#	core-java-modules/core-java-io/pom.xml
#	core-java-modules/core-java-io/src/test/resources/fileTest.txt
#	core-java-modules/core-java-io/src/test/resources/sampleTextFile.txt
#	core-java-modules/core-java-lambdas/README.md
#	core-java-modules/core-java-lambdas/pom.xml
#	core-java-modules/core-java-serialization/pom.xml
#	core-java-modules/core-java-streams/README.md
#	core-java-modules/core-java-streams/pom.xml
#	core-java-modules/core-java-strings/README.md
#	core-java-modules/core-java-strings/pom.xml
#	core-java-modules/core-java-strings/src/test/resources/stringtoolong.txt
#	core-java-modules/core-java-uuid/README.md
#	core-java-modules/core-java-uuid/pom.xml
#	core-java-modules/pom.xml
#	image-processing/README.md
#	image-processing/pom.xml
#	image-processing/src/main/java/com/baeldung/imageprocessing/addingtext/AddText.java
#	image-processing/src/main/java/com/baeldung/imageprocessing/opencv/CameraStream.java
#	jackson-modules/jackson-annotations/README.md
#	jackson-modules/jackson-annotations/pom.xml
#	jackson-modules/jackson-conversions-2/README.md
#	jackson-modules/jackson-conversions-2/pom.xml
#	jackson-modules/jackson-conversions/README.md
#	jackson-modules/jackson-conversions/pom.xml
#	jackson-modules/jackson-custom-conversions/README.md
#	jackson-modules/jackson-custom-conversions/pom.xml
#	jackson-modules/jackson-custom-conversions/src/test/java/com/baeldung/defaultserializercustomserializer/CallingDefaultSerializerUnitTest.java
#	jackson-modules/jackson-custom-conversions/src/test/java/com/baeldung/deserialization/CustomDeserializationUnitTest.java
#	jackson-modules/jackson-exceptions/README.md
#	jackson-modules/jackson-exceptions/pom.xml
#	jackson-modules/jackson-exceptions/src/test/java/com/baeldung/exceptions/JacksonExceptionsUnitTest.java
#	jackson-modules/jackson-exceptions/src/test/java/com/baeldung/mappingexception/JacksonMappingExceptionUnitTest.java
#	jackson-modules/pom.xml
#	parent-boot-1/pom.xml
#	parent-boot-2/pom.xml
#	parent-boot-3/pom.xml
#	patterns-modules/design-patterns-architectural/pom.xml
#	patterns-modules/design-patterns-architectural/src/main/java/com/baeldung/repositoryvsdaopattern/UserDaoImpl.java
#	patterns-modules/design-patterns-behavioral-2/README.md
#	patterns-modules/design-patterns-behavioral-2/pom.xml
#	patterns-modules/design-patterns-creational-2/README.md
#	patterns-modules/design-patterns-creational-2/pom.xml
#	patterns-modules/design-patterns-singleton/README.md
#	patterns-modules/design-patterns-structural/src/main/resources/log4jstructuraldp.properties
#	patterns-modules/enterprise-patterns/pom.xml
#	patterns-modules/intercepting-filter/pom.xml
#	patterns-modules/pom.xml
#	persistence-modules/activejdbc/pom.xml
#	persistence-modules/hibernate5/README.md
#	persistence-modules/hibernate5/pom.xml
#	persistence-modules/hibernate5/src/main/java/com/baeldung/hibernate/interceptors/CustomInterceptor.java
#	persistence-modules/hibernate5/src/main/java/com/baeldung/hibernate/interceptors/entity/User.java
#	persistence-modules/hibernate5/src/main/java/com/baeldung/hibernate/namingstrategy/CustomPhysicalNamingStrategy.java
#	persistence-modules/hibernate5/src/main/java/com/baeldung/hibernate/persistjson/Customer.java
#	persistence-modules/hibernate5/src/main/java/com/baeldung/hibernate/persistjson/HashMapConverter.java
#	persistence-modules/hibernate5/src/main/java/com/baeldung/hibernate/pojo/OrderEntryIdClass.java
#	persistence-modules/hibernate5/src/main/java/com/baeldung/hibernate/pojo/OrderEntryPK.java
#	persistence-modules/hibernate5/src/test/java/com/baeldung/hibernate/IdentifiersIntegrationTest.java
#	persistence-modules/hibernate5/src/test/java/com/baeldung/hibernate/bootstrap/BootstrapAPIIntegrationTest.java
#	persistence-modules/hibernate5/src/test/java/com/baeldung/hibernate/proxy/HibernateProxyUnitTest.java
#	persistence-modules/hibernate5/src/test/resources/hibernate-interceptors.properties
#	persistence-modules/hibernate5/src/test/resources/hibernate-lifecycle.properties
#	persistence-modules/hibernate5/src/test/resources/hibernate-namingstrategy.properties
#	persistence-modules/hibernate5/src/test/resources/hibernate-persistjson.properties
#	persistence-modules/hibernate5/src/test/resources/hibernate.properties
#	persistence-modules/pom.xml
#	persistence-modules/spring-data-jpa-crud/pom.xml
#	persistence-modules/spring-data-jpa-crud/src/main/java/com/baeldung/repository/FruitRepository.java
#	persistence-modules/spring-data-jpa-repo-2/README.md
#	persistence-modules/spring-data-jpa-repo-2/pom.xml
#	persistence-modules/spring-data-jpa-repo-2/src/main/java/com/baeldung/spring/data/persistence/customrepository/model/User.java
#	persistence-modules/spring-data-jpa-repo-2/src/main/java/com/baeldung/spring/data/persistence/customrepository/repository/CustomUserRepositoryImpl.java
#	persistence-modules/spring-data-jpa-repo-2/src/main/java/com/baeldung/spring/data/persistence/saveperformance/Book.java
#	persistence-modules/spring-data-jpa-repo-2/src/main/resources/application.properties
#	persistence-modules/spring-data-mongodb-reactive/pom.xml
#	persistence-modules/spring-data-redis/README.md
#	persistence-modules/spring-data-redis/pom.xml
#	persistence-modules/spring-data-redis/src/main/java/com/baeldung/spring/data/reactive/redis/config/RedisConfig.java
#	persistence-modules/spring-data-redis/src/main/java/com/baeldung/spring/data/redis/config/RedisConfig.java
#	persistence-modules/spring-data-redis/src/main/java/com/baeldung/spring/data/redis/model/Student.java
#	persistence-modules/spring-data-redis/src/main/java/com/baeldung/spring/data/redis/queue/RedisMessageSubscriber.java
#	persistence-modules/spring-data-redis/src/test/java/com/baeldung/spring/data/reactive/redis/template/RedisKeyCommandsManualTest.java
#	persistence-modules/spring-data-redis/src/test/java/com/baeldung/spring/data/reactive/redis/template/RedisTemplateListOpsManualTest.java
#	persistence-modules/spring-data-redis/src/test/java/com/baeldung/spring/data/reactive/redis/template/RedisTemplateValueOpsManualTest.java
#	persistence-modules/spring-data-redis/src/test/java/com/baeldung/spring/data/redis/repo/StudentRepositoryManualTest.java
#	pom.xml
#	testing-modules/assertion-libraries/README.md
#	testing-modules/assertion-libraries/pom.xml
#	testing-modules/junit-5-basics/README.md
#	testing-modules/junit-5-basics/pom.xml
#	testing-modules/mockito-2/src/main/java/com/baeldung/nullmatcher/Helper.java
#	testing-modules/mockito-2/src/main/java/com/baeldung/nullmatcher/Main.java
#	testing-modules/mockito-2/src/main/java/com/baeldung/wantedbutnotinvocked/Helper.java
#	testing-modules/mockito-2/src/main/java/com/baeldung/wantedbutnotinvocked/Main.java
#	testing-modules/mockito-2/src/test/java/com/baeldung/nullmatcher/MainUnitTest.java
#	testing-modules/mockito-2/src/test/java/com/baeldung/wantedbutnotinvocked/MainUnitTest.java
#	testing-modules/pom.xml
#	testing-modules/spring-mockito/pom.xml
#	web-modules/dropwizard/pom.xml
#	web-modules/jakarta-ee/README.md
#	web-modules/jakarta-ee/pom.xml
#	web-modules/jakarta-ee/src/test/java/com/baeldung/eclipse/krazo/UserControllerUnitTest.java
#	web-modules/java-lite/pom.xml
#	web-modules/javax-servlets-2/README.md
#	web-modules/javax-servlets-2/pom.xml
#	web-modules/javax-servlets/pom.xml
#	web-modules/jee-7/pom.xml
#	web-modules/jooby/pom.xml
#	web-modules/ninja/pom.xml
#	web-modules/pom.xml
#	web-modules/ratpack/pom.xml
#	web-modules/resteasy/pom.xml
#	web-modules/restx/pom.xml
#	web-modules/spark-java/pom.xml
#	web-modules/vraptor/pom.xml
#	xml/README.md
#	xml/pom.xml
#	xml/src/main/resources/customer-binding.xml
#	xml/src/main/resources/sax/baeldung.xml
#	xml/src/test/resources/example_default_parser.xml
#	xml/src/test/resources/example_dom4j.xml
#	xml/src/test/resources/example_jaxb.xml
#	xml/src/test/resources/example_jaxen.xml
#	xml/src/test/resources/example_jdom.xml
#	xml/src/test/resources/example_stax.xml
#	xml/src/test/resources/sax/baeldung.xml
#	xml/src/test/resources/xml/websites.xml
#	xml/src/test/resources/xml/xee_attribute.xml
2024-04-30 12:23:19 -04:00
YuCheng Hu c18eb6d2ed
add all file to git 2024-04-30 12:21:36 -04:00
Harry9656 6b0c4b9a80
JAVA-26760: Updated and standardized the junit-jupiter-engine library (#16357)
* JAVA-26760: Updated and standardized the junit-jupiter-engine library

* JAVA-26760: Updated and standardized the mockito-junit-jupiter library

* fix mockito-junit-jupiter properties

* fix maven-custom-plugin/usage-example properties

* Fix quarkus-funqy

* JAVA-26760: Fix NamespacedHierarchicalStore error in junit
2024-04-23 18:45:06 +02:00
anuragkumawat af6d810f48
JAVA-31275 Upgrade spring-cloud-data-flow-stream-processing module (#16249) 2024-04-15 15:22:27 +03:00
Loredana Crusoveanu 8006e9d43f
Update README.md 2024-04-11 19:26:29 +03:00
Harry9656 4394e828c1
JAVA-32410: Update mockito-core to version 5.11.0 (#16199)
* JAVA-32410: Update mockito-core to version 5.11.0

* Fix rollback mockito upgrade.

* wip

* WIP: Update jee-7 wildfly versions

* WIP: Fix jersey tests

* WIP: rollback powermock module

* wip: fix test in spring-data-dynamodb

* wip: fix test in spring-security-legacy-oidc

* wip: rollback quarkus

* wip: fix greeter-spring-boot-autoconfigure

* JAVA-33535: Fix spring-core module integration test

JAVA-33535: rollback junit-5 module mockito version.

* Fix byte-buddy

* Fix log4j dependency in apache-poi
2024-04-11 01:26:19 +02:00
rcalago 19e7692e91
Update README.md 2024-04-03 23:58:02 +08:00
Tetiana Okhotnik 5c18b2e7f7 BAEL-7238 Inject mock into Spy object in Mockito
- added "library" service to demonstrate mockito injection features
- updated mockito version to 5.10
2024-03-27 20:47:25 +02:00
rcalago 14458ca985
Update README.md 2024-02-09 21:20:16 +08:00
Thibault Faure 267efec81e BAEL-7399 Code for the Injecting @Mock and @Captor in JUnit5 Method Parameters article 2024-01-22 22:46:14 +01:00
edizor 110cf95773 Update README.md
[skip ci]
2023-12-17 08:07:58 +08:00
panos-kakos bf1aaf197f [JAVA-28504] Clean up 2023-12-08 08:51:11 +01:00
Sam Gardner 75afba12d1 BAEL-7240 Add example code for verifying lambda calls with mockito 2023-12-04 13:18:04 +00:00
edizor fe818359cc Update README.md
[skip ci]
2023-09-30 00:21:44 +08:00
edizor 8b50598314 Update README.md
[skip ci]
2023-09-21 20:04:09 +08:00
Jonathan Cook 2e58e30ffa BAEL-6221 Get Mocks from MockedConstruction in Mockito (#14776)
Co-authored-by: jcook02 <jonathan.paul.cook@ext.esa.int>
2023-09-19 18:51:33 +02:00
edizor b032c439b3 Update README.md
[skip ci]
2023-09-16 09:05:48 +08:00
Shahul Basha f3069c6ebc BAEL-6830 (#14742)
* BAEL-6830 example changed based on editor review comments

* BAEL-6830 example changed based on editor review comments

* BAEL-6830 example changed based on editor review comments
2023-09-10 08:45:10 -07:00
davidmartinezbarua c23598241f Merge pull request #14721 from sam-gardner/BAEL-6729-mock-same-method-different-params
BAEL-6729 Add example code for mocking one method with multiple param…
2023-09-08 14:17:23 -03:00
Shahul Basha 75046a3f32 BAEL-6830 (#14722)
* BAEL-6830 initial commit

* BAEL-6830 clean up code
2023-09-05 17:41:18 -07:00
Sam Gardner 4c7bc8d19a BAEL-6729 Add example code for mocking one method with multiple parameters 2023-09-05 19:18:56 +01:00
Bipin kumar cd747f077b Java 22625 S to Z (#14332)
* JAVA-22625: Changes made for module T to Z formatting the pom.xml

* JAVA-22625: Changes made for module S  to Z formatting the pom.xml
2023-06-30 16:38:28 +05:30
edizor 2ec227acf0 Update README.md
[skip ci]
2023-06-21 17:53:50 +08:00
Loredana Crusoveanu 5db672092a Merge pull request #14238 from edizor/master
Update README
2023-06-16 12:49:21 +03:00
davidmartinezbarua fec5f3af14 Merge pull request #14220 from thibaultfaure/article/BAEL-6482
BAEL-6482 Code for the Matching Null With Mockito article
2023-06-15 17:05:53 -03:00
edizor 7bf3991066 Update README.md
[skip ci]
2023-06-15 23:04:52 +08:00
thibault.faure d928abe033 BAEL-6482 Code for the Matching Null With Mockito article 2023-06-10 16:30:05 +02:00
thibault.faure 1e4c42c6d1 BAEL-6587 Code for the Mockito Exception article 2023-06-05 20:19:07 +02:00
freelansam 456652e02b JAVA-16563: Fix formatting of POMs (#13175) 2022-12-20 22:37:54 +05:30
edizor 2987e954fe Update README.md
[skip ci]
2022-11-11 09:35:38 +08:00
Abhinav Pandey 113c42199a BAEL-5777 - Mocking a singleton with Mockito (#12977)
* BAEL-5777 - Mocking a singleton with Mockito

* BAEL-5777 - Mocking a singleton with Mockito - changing test class name

* BAEL-5777 - Mocking a singleton with Mockito - moving to new module
2022-11-07 10:17:03 +05:30
anuragkumawat b23fcdc4c4 JAVA-13336 Refactor mockito modules (#12517)
* JAVA-13336 Refactor mockito modules

* JAVA-13336 Fix Jenkins build
2022-07-21 23:10:50 +05:30
Dhawal Kapil 24d4feb541 JAVA-12032 Move Mockito ebook articles code to common module - mockito-simple- Delete mockito-3 since it had only 1 article which was moved to mockito-simple 2022-07-15 17:52:21 +05:30
Azhwani 7f97acf361 BAEL-4469: Update Introduction to Mockito AdditionalAnswers (#12267)
* init commit

* improve test cases
2022-06-05 17:26:59 +02:00
sampadawagde 65f643262d JAVA-9022: Fix formatting of POMs 2022-01-10 22:05:47 +05:30
chaos2418 000dcdf966 JAVA-3591: updating mockito-core to 4.1.0 2021-12-18 13:40:53 +05:30
chaos2418 af4b37592b JAVA-8267: updating testing-modules's junit and surefire configurations 2021-11-04 16:56:08 +05:30
Dhawal Kapil 1ab0a19d25 Java 3590 (#11367) (#11380)
* Java 3590 (#11367)

* JAVA-3590: updating junit-jupiter dependency in the main pom.xml

* resolving unnecessary mockito stubbings exception

* adding junit-bom in dependency management

* fixing tests which were not getting discovered

* Revert "fixing tests which were not getting discovered"

This reverts commit 2e9ed8df42eb96f7e0929167aabbc2ddd374a263.

* fixing tests in ninja, open-liberty and spring-ejb

* removing junit4 dependency and replacing it with junit-vintage-engine

* removing junit4 dependency and replacing it with junit-vintage-engine in testing-modules, maven-modules and aws-lambda

* removing junit dependency and replacing it with junit-vintage-engine

* removing junit and replacing it with junit-vintage-engine

* fixing tests that were not getting discovered due to old version of junit:junit

* updated failsafe plugin configuration to skip integration tests in blade

* fixing tests that were not getting discovered due to old version of junit:junit

* fixing tests in libraries and libraries-2 modules

Co-authored-by: chaos2418 <>

* Java 3590 - fixing integration tests in restx and spring-5-webflux (#11382)

* JAVA-3590: updating junit-jupiter dependency in the main pom.xml

* resolving unnecessary mockito stubbings exception

* adding junit-bom in dependency management

* fixing tests which were not getting discovered

* Revert "fixing tests which were not getting discovered"

This reverts commit 2e9ed8df42eb96f7e0929167aabbc2ddd374a263.

* fixing tests in ninja, open-liberty and spring-ejb

* removing junit4 dependency and replacing it with junit-vintage-engine

* removing junit4 dependency and replacing it with junit-vintage-engine in testing-modules, maven-modules and aws-lambda

* removing junit dependency and replacing it with junit-vintage-engine

* removing junit and replacing it with junit-vintage-engine

* fixing tests that were not getting discovered due to old version of junit:junit

* updated failsafe plugin configuration to skip integration tests in blade

* fixing tests that were not getting discovered due to old version of junit:junit

* fixing tests in libraries and libraries-2 modules

* fixing integration tests in restx and spring-5-webflux

Co-authored-by: chaos2418 <>

Co-authored-by: chaos2418 <92030908+chaos2418@users.noreply.github.com>
2021-10-29 09:37:04 +05:30
sampadawagde d9db0949cb JAVA-5223: Fix formatting of POMs (Testing Modules) 2021-05-17 20:23:43 +05:30
johnA1331 b6570de637 Update README.md 2021-01-28 01:11:32 +08:00
Jonathan Cook 9144660a72 BAEL-4756 - Mockito MockSettings - fix spelling (#10438)
* BAEL-4706 - Spring Boot with Spring Batch

* BAEL-3948 - Fix test(s) in spring-batch which leaves repository.sqlite
changed

* BAEL-4736 - Convert JSONArray to List of Object using camel-jackson

* BAEL-4756 - Mockito MockSettings

* BAEL-4756 - Mockito MockSettings - fix spelling

Co-authored-by: Jonathan Cook <jcook@sciops.esa.int>
2021-01-23 07:08:50 +01:00
Jonathan Cook b9c81b0ced BAEL-4756 - Mockito MockSettings (#10423)
* BAEL-4706 - Spring Boot with Spring Batch

* BAEL-3948 - Fix test(s) in spring-batch which leaves repository.sqlite
changed

* BAEL-4736 - Convert JSONArray to List of Object using camel-jackson

* BAEL-4756 - Mockito MockSettings

Co-authored-by: Jonathan Cook <jcook@sciops.esa.int>
2021-01-17 11:39:53 +01:00
Loredana Crusoveanu 11818a04a3 Merge pull request #10029 from Maiklins/Java-2136-update-jackson-version-in-main-pom
Java-2136 update jackson version in main pom
2020-09-30 10:53:54 +03:00
johnA1331 5ae7a913cf Update README.md 2020-09-16 23:48:50 +08:00
mikr 6927cc7237 Java-2136 Use Jackson version from main pom in all other applicable modules 2020-09-14 13:11:59 +02:00
fanatixan 74efd2530e added code snippets for bael-4554 (#9979) 2020-09-06 19:13:25 -07:00
johnA1331 308bd8998b Update README.md 2020-08-20 13:07:18 +08:00
Loredana Crusoveanu db4c926b1a Merge pull request #9773 from eugenp/BAEL-16668-v2
Bael 16668 v2
2020-08-13 17:13:32 +03:00
kwoyke 6889e238ff BAEL-3415: Get rid of the MockitoAnnotations.initMocks (#9787) 2020-07-30 07:50:21 +02:00
Loredana 2dbb667128 article was moved to mockito-2; remove duplicate methods from mockito module 2020-07-27 12:01:55 +03:00