Learn about FileWriter’s common usage and delve into the differences between its flush() and close() methods.
Search Results for: junit
Add Authorities as Custom Claims in JWT Access Tokens in Spring Authorization Server
Learn how to add resource owner authorities to a JWT access token in the Spring Authorization Server.
Get Specific Part From SOAP Message in Java
Learn several ways to get a specific part of a SOAP Message in Java.
Read Multiple Messages with Apache Kafka
Explore how the Kafka Consumer retrieves messages from the broker.
Creating Reactive APIs With Micronaut and MongoDB
Learn how to create reactive REST APIs with Micronaut and MongoDB.
Free eBook: Mockito
Get our free eBook and learn how to work with Mockito
Creating a Kafka Listener Using the Consumer API
Learn how to create a Kafka listener and consume messages from a topic using Kafka’s Consumer API.
Representing Furthest Possible Date in Java
Learn how to represent the furthest possible date using the java.util.Date and java.lang.Long classes.
Switching Between Frames Using Selenium WebDriver in Java
Explore a few distinct methods to switch between frames with Selenium WebDriver.
A Guide to OpenRewrite
Learn the basics of the OpenRewrite, a library to for managing Maven dependencies.
Add a List as Query Parameter in Jersey
Explore different ways to add a list as a query parameter when making requests using the Jersey client.
Overriding Cucumber Option Values
Explore three methods to override the Cucumber option values.
Arrays mismatch() Method in Java
Learn about the Arrays mismatch() method.
How to Mock Environment Variables in Unit Tests
Learn how to write unit tests for code that uses environment variables with these Java testing libraries.
Wrapping a String After a Number of Characters Word-Wise
Learn to wrap a sentence automatically after a given number of characters.
Java Weekly, Issue 512
Markdown coming to Java comments? Oh, and lots of Kafka 🙂
How to Reuse Testcontainers in Java
Learn how to reuse Testcontainers when setting up the environment for local development and testing.
Difference Between putIfAbsent() and computeIfAbsent() in Java’s Map
Learn the differences between Java Map’s putIfAbsent() and computeIfAbsent() through examples.
SpringRunner vs. SpringBootTest
Learn about SpringRunner and SpringBootTest.
Testing Interface Contract in Java
Explore several ways of writing JUnit tests to validate interface contracts in Java.