Added unit tests for loopback device