### Question:
ServiceHelper { public static Object getGlobalInstance(Class<?> clazz, Object bundle) { return getGlobalInstance(clazz, bundle, null); } private  ServiceHelper(); static void overrideGlobalInstance(Class<T> clazz, T instance); static Object getGlobalInstance(Class<?> clazz, Object bundle); static Object getGlobalInstance(Class<?> clazz, Object bundle,
                                           String serviceFilter);  }### Answer:
@Test public void getGlobalInstanceTest() { PowerMockito.mockStatic(FrameworkUtil.class); PowerMockito.when(FrameworkUtil.getBundle(any(Class.class))) .thenReturn(null); Object object = ServiceHelper.getGlobalInstance(Test.class, this); assertNull("Service should be null", object); PowerMockito.when(FrameworkUtil.getBundle(any(Class.class))) .thenReturn(new MockBundle()); object = ServiceHelper.getGlobalInstance(Test.class, this); assertNotNull("Service should not be null", object); }