I'd make this parsing a bit more strict: fail if the word is not in mapFlagNames instead of treating it as 0. This avoids tests testing something else than you think due to a typo.