The interface in the example implements a simple handshake protocol (request/grant). The interface connects a request source to a drain which grants the requests. LFSR are used to randomize the request and grant signal. All three (source, interface, drain) count the number of granted requests. The test checks if this three numbers are in agreement before it finishes. Modports are used to prevent the source/drain instances from accessing the interface internal counter.
Use the example code from: https://github.com/jeras/ivtest/tree/test_sv
iverilog -g2009 ivltests/sv_interface.v && vvp a.out
or the attached file.