Correct bug identified in static analysis

This change corrects a flag test bug identified during static analysis
of the code. Several tests were added and/or enhanced to beef up
the coverage.

Issue-ID: RIC-777

Signed-off-by: E. Scott Daniels <daniels@att.com>
Change-Id: Icd56f9a669e9583446ac80a5120bc42193eb7adb
Signed-off-by: E. Scott Daniels <daniels@att.com>
16 files changed