Added tests for libraries controller