Added unit tests for AFP

Initial unit test for AFP