Java
-
Mockito when-then vs do-when
Writing unit test is very important for better software quality. For unit tests Mockito is one of the most common…
Read More » -
Java Math pow() method Example (Recursive and Loop Iterative)
A quick guide to Math.pow() method in java. Custom implementation of Math pow() using iterative and recursive approaches. 1. Overview…
Read More » -
Did You Know You Can Create Mappers Without Creating Underlying Objects in Java?
As most Java developers know, putting values in a Java Map (like a HashMap) involves creating a large number of…
Read More » -
How to properly inject CDI beans into JAX-RS sub-resources
Jakarta REST (JAX-RS) defines it’s own dependency injection using the @Context annotation. REST resources also support CDI injection if you enable CDI on the…
Read More » -
Add Grpc to your Spring Application
On the previous example we had a Java application spinning up an http server and upon this Java process operating…
Read More » -
Avoid leaking domain logic
Many software architectures try to separate domain logic from other parts of the application. To follow this practice we always…
Read More » -
Using JaCoCo to measure system test coverage
Measuring test coverage of your production code can quickly become a heated topic, especially with regards to which percentage is…
Read More » -
Logging Side Effects
One would like to assume that turning logging on would have no side effect on the running software. LOGGER.info("The current…
Read More » -
Execute mTLS calls using Java
Previously we secured an Nginx instance using SSL and mTLS. If you are using Java interacting with a service secured…
Read More »