Added unit tests for AFP