tests: improve branch coverage