Added more junit tests for chain