@@ -0,0 +1,2264 @@
+/*%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.staticdata;%0A%0Aimport static org.junit.Assert.assertArrayEquals;%0Aimport static org.junit.Assert.assertEquals;%0A%0Aimport java.util.Collections;%0Aimport java.util.List;%0Aimport java.util.Set;%0A%0Aimport prm4j.AbstractTest;%0Aimport prm4j.Util;%0Aimport prm4j.api.BaseEvent;%0Aimport prm4j.api.Parameter;%0Aimport prm4j.api.fsm.FSMSpec;%0Aimport prm4j.spec.FiniteParametricProperty;%0A%0Apublic class AbstractStaticDataConverterTest extends AbstractTest %7B%0A%0A    protected FiniteParametricProperty fpp;%0A    protected StaticDataConverter sdc;%0A%0A    protected void init(FSM_HasNext fsm) %7B%0A%09fpp = new FiniteParametricProperty(new FSMSpec(fsm.fsm));%0A%09sdc = new StaticDataConverter(fpp);%0A    %7D%0A%0A    protected final static MaxData%5B%5D EMPTY_MAXDATA_ARRAY = new MaxData%5B0%5D;%0A    protected final static Set%3CChainData%3E EMPTY_CHAINDATA_SET = Collections.emptySet();%0A    protected final static List%3CJoinData%3E EMPTY_JOINDATA_LIST = Collections.emptyList();%0A%0A    protected void assertChainData(Set%3CParameter%3C?%3E%3E parameterSet, Set%3CChainData%3E chainDataSet) %7B%0A%09assertEquals(chainDataSet, sdc.getMetaTree().getMetaNode(Util.asSortedList(parameterSet)).getChainDataSet());%0A    %7D%0A%0A    protected void assertJoinData(BaseEvent baseEvent, List%3CJoinData%3E joinDataList) %7B%0A%09assertArrayEquals(joinDataList.toArray(), sdc.getEventContext().getJoinData(baseEvent));%0A    %7D%0A%0A    protected void assertMaxData(BaseEvent baseEvent, List%3CMaxData%3E maxDataList) %7B%0A   %09assertArrayEquals(maxDataList.toArray(), sdc.getEventContext().getMaxData(baseEvent));%0A       %7D%0A%0A    protected static ChainData chainData(int%5B%5D nodeMask, int monitorSetId) %7B%0A%09return new ChainData(nodeMask, monitorSetId);%0A    %7D%0A%0A    protected static JoinData joinData(int%5B%5D nodeMask, int monitorSetId, int%5B%5D extensionPattern, int%5B%5D copyPattern,%0A%09    int%5B%5D diffMask) %7B%0A%09return new JoinData(nodeMask, monitorSetId, extensionPattern, copyPattern, diffMask);%0A    %7D%0A%0A%7D%0A

Add AbstractStaticDataConverterTest