Made getcapabilitiesdict testable, added tests