@@ -0,0 +1,2039 @@
+/*%0A * Copyright 2012 Harald Wellmann%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A * http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or%0A * implied.%0A *%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage org.ops4j.pax.exam.glassfish;%0A%0Aimport static org.hamcrest.core.Is.is;%0Aimport static org.hamcrest.core.IsNull.notNullValue;%0Aimport static org.junit.Assert.assertThat;%0Aimport static org.ops4j.pax.exam.CoreOptions.junitBundles;%0Aimport static org.ops4j.pax.exam.CoreOptions.options;%0Aimport static org.ops4j.pax.exam.CoreOptions.systemProperty;%0Aimport static org.ops4j.pax.exam.CoreOptions.*;%0A%0Aimport javax.inject.Inject;%0A%0Aimport org.glassfish.embeddable.GlassFish;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.ops4j.pax.exam.Option;%0Aimport org.ops4j.pax.exam.junit.Configuration;%0Aimport org.ops4j.pax.exam.junit.ExamReactorStrategy;%0Aimport org.ops4j.pax.exam.junit.JUnit4TestRunner;%0Aimport org.ops4j.pax.exam.spi.reactors.AllConfinedStagedReactorFactory;%0Aimport org.osgi.framework.BundleContext;%0A%0A@RunWith( JUnit4TestRunner.class )%0A@ExamReactorStrategy( AllConfinedStagedReactorFactory.class )%0Apublic class WarProbeTest%0A%7B%0A    @Inject%0A    private BundleContext bc;%0A%0A    @Inject%0A    private GlassFish gf;%0A%0A    @Configuration( )%0A    public Option%5B%5D config()%0A    %7B%0A        return options(%0A            systemProperty( %22osgi.console%22 ).value( %226666%22 ),%0A            war( %22file:/tmp/pax-exam.war%22 ),%0A            junitBundles() );%0A    %7D%0A%0A    @Test%0A    public void getBundleContext() throws InterruptedException%0A    %7B%0A        assertThat( bc, is( notNullValue() ) );%0A        assertThat( gf, is( notNullValue() ) );%0A    %7D%0A%7D%0A

test for WAR probes