Created jUnit test for KVServer. Fixed some locking and throwing bugs in KVServer