integration test for get branches

Copy-paste. Fix for #277.