@@ -0,0 +1,1833 @@
+/*%0A * Copyright (c) 2012 Mateusz Parzonka, Eric Bodden%0A * All rights reserved. This program and the accompanying materials%0A * are made available under the terms of the Eclipse Public License v1.0%0A * which accompanies this distribution, and is available at%0A * http://www.eclipse.org/legal/epl-v10.html%0A *%0A * Contributors:%0A * Mateusz Parzonka - initial API and implementation%0A */%0Apackage prm4j.indexing.realtime;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertNotSame;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport prm4j.AbstractTest;%0Aimport prm4j.api.fsm.FSMSpec;%0Aimport prm4j.indexing.staticdata.StaticDataConverter;%0Aimport prm4j.spec.FiniteParametricProperty;%0Aimport prm4j.spec.FiniteSpec;%0A%0Apublic class DefaultNodeStoreTest extends AbstractTest %7B%0A%0A    FSM_a_a_a fsm;%0A    FiniteSpec finiteSpec;%0A    StaticDataConverter converter;%0A    DefaultNodeStore nodeStore;%0A    LowLevelBinding%5B%5D bindings;%0A%0A    @Before%0A    public void init() throws Exception %7B%0A%09fsm = new FSM_a_a_a();%0A%09finiteSpec = new FSMSpec(fsm.fsm);%0A%09converter = new StaticDataConverter(new FiniteParametricProperty(finiteSpec));%0A%09nodeStore = new DefaultNodeStore(converter.getMetaTree());%0A%09bindings = new LowLevelBinding%5B1%5D;%0A%09bindings%5B0%5D = new DefaultLowLevelBinding(%22a%22, fsm.p1, 42, null);%0A    %7D%0A%0A    @Test%0A    public void getNodeNonCreative_nonExistingNodeIsNullNode() throws Exception %7B%0A%09assertEquals(NullNode.instance, nodeStore.getNodeNonCreative(bindings));%0A    %7D%0A%0A    @Test%0A    public void get_createNewNode() throws Exception %7B%0A%09assertNotSame(NullNode.instance, nodeStore.getNode(bindings));%0A    %7D%0A%0A    @Test%0A    public void get_getNonCreativeReturnsStoredNode() throws Exception %7B%0A%09Node node1 = nodeStore.getNode(bindings);%0A%09Node node2 = nodeStore.getNodeNonCreative(bindings);%0A%09assertEquals(node1, node2);%0A    %7D%0A%0A%7D%0A

Add test suite for DefaultNodeStore