/*
 * #%L
 * Wisdom-Framework
 * %%
 * Copyright (C) 2013 - 2015 Wisdom Framework
 * %%
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * #L%
 */
package org.wisdom.jcrom.multipackage;

import org.junit.Assert;
import org.junit.Test;
import org.osgi.framework.BundleContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.wisdom.jcrom.runtime.JcromCrudProvider;
import org.wisdom.test.parents.WisdomTest;

import javax.inject.Inject;

/**
 * TODO write documentation<br>
 *<br>
 * Created at 25/03/2015 10:56.<br>
 *
 * @author Bastien
 *
 */
public class MultiPackageIT extends WisdomTest {
    /**
     * The famous {@link org.slf4j.Logger}
     */
    private static final Logger logger = LoggerFactory.getLogger(MultiPackageIT.class);

    @Inject
    private JcromCrudProvider jcromCrudProvider;

    @Test
    public void multiPackage() {
        Assert.assertEquals(2, jcromCrudProvider.getRepository().getCrudServices().size());
    }

}

@@ -708,21 +708,70 @@
 .junit.A
-ssert
+fter;%0Aimport org.junit.Assert;%0Aimport org.junit.Before
 ;%0Aimport
@@ -828,16 +828,119 @@
 ontext;%0A
+import org.osgi.framework.InvalidSyntaxException;%0Aimport org.ow2.chameleon.testing.helpers.OSGiHelper;%0A
 import o
@@ -1010,39 +1010,22 @@
 dom.
-jcrom.runtime.JcromCrudProvider
+api.model.Crud
 ;%0Aim
@@ -1093,16 +1093,39 @@
 .Inject;
+%0Aimport java.util.List;
 %0A%0A/**%0A *
@@ -1443,179 +1443,463 @@
     
-private JcromCrudProvider jcromCrudProvider;%0A%0A    @Test%0A    public void multiPackage() %7B%0A        Assert.assertEquals(2, jcromCrudProvider.getRepository().getCrudServices()
+BundleContext context;%0A%0A    OSGiHelper osgi;%0A%0A    @Before%0A    public void setUp() throws InvalidSyntaxException, InterruptedException %7B%0A        osgi = new OSGiHelper(context);%0A    %7D%0A%0A    @After%0A    public void tearDown() %7B%0A        osgi.dispose();%0A    %7D%0A%0A    @Test%0A    public void multiPackage() %7B%0A        osgi.waitForService(Crud.class, null, 5000);%0A        final List%3CCrud%3E cruds = osgi.getServiceObjects(Crud.class);%0A        Assert.assertEquals(2, cruds
 .siz

Fix #5 The injected value was not a service.