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.
Selenium IDE for First Timers
This post demonstrates how to use Selenium IDE for first timers testers and even developers.
Build/Install Maven Projects in Separate Directors in Travis CI via GitHub
This blog demonstrates how to build/install maven projects in separate directories in Travis CI via GitHub.com
Consume RESTful Web Services in Java using RestTemplate
This post demonstrates how to use Spring’s RestTemplate to consume RESTful web services in Java. The codes used are used in a SOA or Microservices context but the key code snippet is about RestTemplate.
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().
Java – comparing numeric primitives
Comparing numeric primitives in Java.
Java – break outer loop from inner loop
Whenever you use break; (or continue;), by default it only affects the current loop where it is invoked . If you are in a inner loop, surely the only loop that you can break; from is that loop. What if you need to break; from the outer-most loop in order to proceed to the next set of instructions?
Eclipse – Highlight selected text
I’ve been using this copy of Eclipse Mars since last year but only noticed today that selected texts are not highlighted. So, I thought maybe they made it configurable or turned off by default.
Array-backed Lists in Java
In Java, there are these array-backed lists that are generated when you convert arrays to lists using Arrays.asList(…). The list and the array objects point to the same data stored in the heap. Changes to the existing contents through either the list or array result to changing the same data.
Java – Sort Objects in Collections
Before Java 8, sorting objects in collections is a bit awkward and verbose in terms of the amount of codes you need to put in. With Java 8, things got easier because of Lambda expressions.