Adding utiliy functions for building the triplets for each test case