test bench to simulate the latch