/*
- * Copyright (C) 2015 Red Hat, Inc.
+ * Copyright (C) 2015 Red Hat, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
Bundle bundle = new MockBundle();
PowerMockito.mockStatic(FrameworkUtil.class);
- PowerMockito.when(FrameworkUtil.getBundle(any(Class.class)))
- .thenReturn(null)
- .thenReturn(bundle);
+ 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(bundle);
object = ServiceHelper.getGlobalInstance(Test.class, this);
assertNotNull("Service should not be null", object);
}