Merge "apf: Add immediate encoding tests for LI" into pi-dev