Add TestCase for the the chain function thanks to @Quintus