Functional testing is a quality assurance (QA) process and a type of black-box testing that bases its test cases on the specifications of the software component under test. Functions are tested by feeding them input and examining the output, and internal program structure is rarely considered (unlike white-box testing).[2] Functional testing usually describes what the system does. -Wiki
We'll walk through an example here, by creating a function and its test.
Paste following code in a module, then map it to endpoint.
According to functional test we need to make sure output goes as