PIC18LF24K40 I2C read and write using Polling method
Load test values in a dummy MCU and try simulating with the Proteus design suite, but i agree with Buhra with checking the flag for successful reception from the slave, and if possible check necessary flags that indicate a free buffer and transmission-ready state.