Fix tests & build of adam-core