NTT DATA Interview Question

Given a custom junit test case and asked to implement the functional code.