Add latch test
Organize test better