Created test case for read and write locks