<commit_before><commit_msg>Copied verbatim to preserve history.<commit_after>package no.steria.osgi.jsr330activator.tests;

import static org.junit.Assert.*;
import static org.ops4j.pax.exam.CoreOptions.junitBundles;
import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
import static org.ops4j.pax.exam.CoreOptions.options;
import static org.ops4j.pax.exam.CoreOptions.systemProperty;

import javax.inject.Inject;

import no.steria.osgi.jsr330activator.Jsr330Activator;
import no.steria.osgi.jsr330activator.testbundle1.HelloService;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.ops4j.pax.exam.Configuration;
import org.ops4j.pax.exam.Option;
import org.ops4j.pax.exam.junit.PaxExam;
import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
import org.ops4j.pax.exam.spi.reactors.PerClass;

/**
 * Integration test that tests a bundle using a {@link Jsr330Activator}
 * as its bundle activator.  The Jsr330Activator is found and loaded
 * from a jsr330activator.implementation bundle in the OSGi runtime.
 *
 * @author <NAME>
 *
 */
@RunWith(PaxExam.class)
@ExamReactorStrategy(PerClass.class)
public class Jsr330ActivatorIntegrationTest extends Jsr330ActivatorIntegrationtestBase {

    @Inject
    private HelloService helloService;

    @Configuration
    public Option[] config() {
        return options(
                       systemProperty("logback.configurationFile").value("file:src/test/resources/logback.xml"),
                       mavenBundle("org.slf4j", "slf4j-api", "1.7.2"),
                       mavenBundle("ch.qos.logback", "logback-core", "1.0.4"),
                       mavenBundle("ch.qos.logback", "logback-classic", "1.0.4"),
                       mavenBundle("no.steria.osgi.jsr330activator", "jsr330activator.implementation", getMavenProjectVersion()),
                       mavenBundle("no.steria.osgi.jsr330activator", "jsr330activator.testbundle1", getMavenProjectVersion()),
                       junitBundles());
    }

    /**
     * Verifies that the activator in testbundle1 starts, finds a
     * service implementation, and registers it in the OSGi service
     * registry
     */
    @Test
    public void testbundle1ServiceFoundAndActivated() {
    	assertEquals("Hello world!", helloService.getMessage());
    }

}
{'fraction_non_alphanumeric': 0.11082024432809773, 'fraction_numerical': 0.0274869109947644, 'mean_word_length': 3.5496031746031744, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3147078', 'n_tokens_mistral': 772, 'n_tokens_neox': 721, 'n_words': 131}