@@ -0,0 +1,2184 @@
+/**%0A * Copyright 2010 OpenEngSB Division, Vienna University of Technology%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 */%0A%0Apackage org.openengsb.core.persistence.internal;%0A%0Aimport static org.hamcrest.CoreMatchers.is;%0Aimport static org.hamcrest.CoreMatchers.notNullValue;%0Aimport static org.junit.Assert.assertThat;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.mockito.Mockito;%0Aimport org.openengsb.core.persistence.PersistenceService;%0Aimport org.osgi.framework.Bundle;%0Aimport org.osgi.framework.Version;%0A%0Apublic class NeodatisPersistenceManagerTest %7B%0A%0A    private NeodatisPersistenceManager persistenceManager;%0A%0A    private Bundle bundleMock;%0A%0A    @Before%0A    public void setUp() %7B%0A        persistenceManager = new NeodatisPersistenceManager();%0A        persistenceManager.setPersistenceRootDir(%22target/data%22);%0A        bundleMock = Mockito.mock(Bundle.class);%0A        Mockito.when(bundleMock.getSymbolicName()).thenReturn(%22testBundle%22);%0A        Version versionMock = Mockito.mock(Version.class);%0A        Mockito.when(bundleMock.getVersion()).thenReturn(versionMock);%0A    %7D%0A%0A    @Test%0A    public void getPersistenceForBundle_shouldCreatePersistenceService() %7B%0A        PersistenceService persistenceService = persistenceManager.getPersistenceForBundle(bundleMock);%0A        assertThat(persistenceService, notNullValue());%0A    %7D%0A%0A    @Test%0A    public void getPersistenceForBundleTwice_shouldReturnSamePersistenceService() %7B%0A        PersistenceService first = persistenceManager.getPersistenceForBundle(bundleMock);%0A        PersistenceService second = persistenceManager.getPersistenceForBundle(bundleMock);%0A        assertThat(second == first, is(true));%0A    %7D%0A%0A%7D%0A

Add test for neodatis service manager.