Added get_cap() in test