@@ -0,0 +1,2630 @@
+/*%0A *      Copyright (C) 2012-2015 DataStax Inc.%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 implied.%0A *   See the License for the specific language governing permissions and%0A *   limitations under the License.%0A */%0Apackage com.datastax.driver.osgi;%0A%0Aimport com.datastax.driver.osgi.api.MailboxException;%0Aimport org.ops4j.pax.exam.Configuration;%0Aimport org.ops4j.pax.exam.Option;%0Aimport org.ops4j.pax.exam.options.MavenArtifactProvisionOption;%0Aimport org.ops4j.pax.exam.testng.listener.PaxExam;%0Aimport org.testng.SkipException;%0Aimport org.testng.annotations.Listeners;%0Aimport org.testng.annotations.Test;%0A%0Aimport static com.datastax.driver.osgi.BundleOptions.*;%0Aimport static org.ops4j.pax.exam.CoreOptions.options;%0A%0A@Listeners(%7BCCMBridgeListener.class, PaxExam.class%7D)%0Apublic class MailboxServiceGuava21IT extends MailboxServiceTests %7B%0A%0A    @Configuration%0A    public Option%5B%5D guava21Config() %7B%0A        MavenArtifactProvisionOption guavaBundle = guavaBundle();%0A        String javaVersion = System.getProperty(%22java.version%22);%0A        // Only bring in 21.0 if java version %3E= 1.8.  If this is not done the framework%0A        // will fail to load for %3C 1.8 and we plan on skipping the test anyways.%0A        if (javaVersion.compareTo(%221.8%22) %3E= 0) %7B%0A            guavaBundle = guavaBundle.version(%2221.0%22);%0A        %7D%0A%0A        return options(%0A                defaultOptions(),%0A                nettyBundles(),%0A                guavaBundle,%0A                driverBundle(),%0A                extrasBundle(),%0A                mappingBundle(),%0A                mailboxBundle()%0A        );%0A    %7D%0A%0A    /**%0A     * Exercises a 'mailbox' service provided by an OSGi bundle that depends on the driver with%0A     * Guava 21 explicitly enforced.%0A     *%0A     * @test_category packaging%0A     * @expected_result Can create, retrieve and delete data using the mailbox service.%0A     * @jira_ticket JAVA-620%0A     * @since 2.0.10, 2.1.5%0A     */%0A    @Test(groups = %22short%22)%0A    public void test_guava_21() throws MailboxException %7B%0A        String javaVersion = System.getProperty(%22java.version%22);%0A        if (javaVersion.compareTo(%221.8%22) %3C 0) %7B%0A            throw new SkipException(%22Guava 21 requires Java 1.8%22);%0A        %7D%0A        checkService();%0A    %7D%0A%7D%0A

Add OSGi test for Guava 21 support