Slight improvements to our UTs
NetworkHandlerTest: explicitly split shared/non-shared testing instead
of relying on successive calls to isShared() (this avoids the test
being too closely linked to the implementation: the test only works if
the code calls isShared() in the way the test expects). Likewise for
isTunnel().
EventDispatcherImplTest:
* the event dispatcher is started by its constructor, no need to start
it explicitly;
* specify a handler type in the mock event to avoid crashing the event
handler;
* instead of "assuming" the event size (which was always wrong since
the events were consumed before we got to the end of the test),
check that the events were dispatched as appropriate.
ServiceHelper:
* in getGlobalInstance(), avoid an ArrayIndexOutOfBoundsException
* check for a null bundle explicitly; this avoids the tests causing a
NullPointerException and producing error logs (and it also means we
can log actual errors with more detail).
ServiceHelperTest: split the null/non-null tests so that we don't rely
on the implementation's calling pattern to getBundle().
Change-Id: Ib1b90fecf286588bc92a4c88f3b89d85c26c53f0
Signed-off-by: Stephen Kitt <skitt@redhat.com>