When we have a fixed set of predefined constants, it is considered a good practice grouping them in an enum type.
Kotlin – Singleton
This post demonstrates how to create a Singleton object in Kotlin.
Should you use Mockito thenReturn or thenAnswer?
Should you use Mockito thenReturn or thenAnswer? It depends! The thenReturn returns the same value in every method run; while the thenAnswer does not. We use the former to return hard-coded values; while we use the latter for derived values.
Kotlin – Read file line by line from Classpath
This post shows how to leverage Java libraries (from our underlying JVM) to read file line by line from classpath using Kotlin. Also, IntelliJ IDE is used for this post but can easily be replicated in Eclipse.
Maven – Create an executable jar
This post demonstrates how to create an executable in Apache Maven using maven-shade-plugin plugin.
Mock methods that return void
Previously, I posted Void methods and Mockito in Java that verifies if any of the methods of a object passed as a argument were invoked. This time we want to alter the behavior of a method that returns void.
Spring Boot, JPA/Hibernate for Java EE 6 Java Persistence API Developer Certified Expert 1Z0-898
If you are planning to take Java EE 6 Java Persistence API Developer Certified Expert (1Z0-898), this post is for you. It demonstrates how to create a sample application using Spring Boot, and JPA/Hibernate to aid in your study.
Render XML using Thymeleaf
This post demonstrates how to render an XML to a file from a given XML template using Spring Boot and Thymeleaf.
Using TimeUnit instead of Thread.sleep()
This post demonstrates how to use TimeUnit as a replacement to the usual and out-dated way to pausing thread via Thread.sleep().
Selenium IDE for First Timers
This post demonstrates how to use Selenium IDE for first timers testers and even developers.