Author: Vinisha Sharma

Mocking static methods with PowerMock

A good developer always writes a unit test case for his/her code. While writing test cases, we came across various types of scenarios, including the one where we need to mock static methods. One of the common examples of such scenario is where our service is using some static methods from a third party library. Here, one way to deal is to have an adapter Continue Reading

Migrating to Lagom 1.4.x in Java

This blog will help you to migrate your Lagom service from 1.3.x to 1.4.x. Here, I have shared few of the things that need to be considered while migrating your Lagom version. Play and Akka version supported: Lagom 1.4 updates to the latest versions of PLAY(2.6) and AKKA(2.5). That means, the part of the code that uses Play and Akka APIs directly, needs to be Continue Reading

Tail Recursion in JAVA 8

A tail-recursive function is just a function whose very the last action is a call to itself. Tail-Call Optimisation(TCO) lets us convert regular recursive calls into tail calls to make recursions practical for large inputs, which was earlier leading to stack overflow error in normal recursion scenario. With Scala, making a tail recursive function is easy. The Scala compiler detects tail recursion and replaces it with Continue Reading

%d bloggers like this: