Fixes in test cases connection manager and entity

Fixes in test cases connection manager and entity classes
Few complex method added provided by S2

Few complex method added provided by S2, still in progress
Java Doc added for new DB methods in DBManager

JavaDoc added for new DB methods in DBManager