// Path: src/main/java/org/wmaop/aop/interceptor/FlowPosition.java
// public class FlowPosition {
// 
// 	public final String packageName;
// 	public final String serviceName;
// 	public final String fqname;
// 	private InterceptPoint interceptPoint;
// 	
// 	public FlowPosition(InterceptPoint point, String fqname) {
// 		interceptPoint = point;
// 		if (fqname == null) {
// 			serviceName = "";
// 			packageName = "";
// 			this.fqname = "";
// 		} else {
// 			this.fqname = fqname;
// 			int pkgsep = fqname.lastIndexOf(':');
// 			if (pkgsep == -1) {
// 				serviceName = fqname;
// 				packageName = "";
// 			} else {
// 				serviceName = fqname.substring(pkgsep + 1);
// 				packageName = fqname.substring(0, pkgsep);
// 			}
// 		}
// 	}
// 	
// 	@Override
// 	public String toString() {
// 		return fqname;
// 	}
// 
// 	public void setInterceptPoint(InterceptPoint point) {
// 		interceptPoint = point;
// 	}
// 
// 	public InterceptPoint getInterceptPoint() {
// 		return interceptPoint;
// 	}
// 
// 	public String getPackageName() {
// 		return packageName;
// 	}
// 
// 	public String getServiceName() {
// 		return serviceName;
// 	}
// 
// 	public String getFqname() {
// 		return fqname;
// 	}
// }
// 
// Path: src/main/java/org/wmaop/aop/interceptor/InterceptPoint.java
// public enum InterceptPoint {
// 		BEFORE,INVOKE,AFTER;
// 
// }
// 
// Path: src/main/java/org/wmaop/aop/matcher/FlowPositionMatcher.java
// public interface FlowPositionMatcher extends Matcher<FlowPosition> {
// 
// 	String getServiceName();
// 
// }
// 
// Path: src/main/java/org/wmaop/aop/matcher/MatchResult.java
// public class MatchResult {
// 
// 	public static final MatchResult FALSE = new MatchResult(false, "undefined");
// 	public static final MatchResult TRUE = new MatchResult(true, "undefined");
// 	
// 	private final boolean isMatch;
// 	private final String id;
// 
// 	public MatchResult(boolean result, String id) {
// 		this.id = id;
// 		isMatch = result;
// 	}
// 
// 	public boolean isMatch() {
// 		return isMatch;
// 	}
// 
// 	public String getId() {
// 		return id;
// 	}
// 	
// 	@Override
// 	public String toString() {
// 		return "MatchResult:"+isMatch+" for " + id;
// 	}
// }
// 
// Path: src/main/java/org/wmaop/aop/matcher/Matcher.java
// public interface Matcher<T> {
// 	MatchResult match(T value);
// 
// 	Map<String, Object> toMap();
// }


import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import org.junit.Before;
import org.junit.Test;
import org.wmaop.aop.interceptor.FlowPosition;
import org.wmaop.aop.interceptor.InterceptPoint;
import org.wmaop.aop.matcher.FlowPositionMatcher;
import org.wmaop.aop.matcher.MatchResult;
import org.wmaop.aop.matcher.Matcher;
import com.wm.data.IData;
package org.wmaop.aop.pointcut;




public class ServicePipelinePointCutTest {

	private FlowPosition pipelinePosition;
	private FlowPositionMatcher serviceNameMatcher;
	private IData idata;
	private Matcher<? super IData> pipelineMatcher;

	@Before
	@SuppressWarnings("unchecked")
	public void setUp() {
		pipelinePosition = mock(FlowPosition.class);
		serviceNameMatcher = mock(FlowPositionMatcher.class);
		idata = mock(IData.class);
// Path: src/main/java/org/wmaop/aop/interceptor/FlowPosition.java
// public class FlowPosition {
// 
// 	public final String packageName;
// 	public final String serviceName;
// 	public final String fqname;
// 	private InterceptPoint interceptPoint;
// 	
// 	public FlowPosition(InterceptPoint point, String fqname) {
// 		interceptPoint = point;
// 		if (fqname == null) {
// 			serviceName = "";
// 			packageName = "";
// 			this.fqname = "";
// 		} else {
// 			this.fqname = fqname;
// 			int pkgsep = fqname.lastIndexOf(':');
// 			if (pkgsep == -1) {
// 				serviceName = fqname;
// 				packageName = "";
// 			} else {
// 				serviceName = fqname.substring(pkgsep + 1);
// 				packageName = fqname.substring(0, pkgsep);
// 			}
// 		}
// 	}
// 	
// 	@Override
// 	public String toString() {
// 		return fqname;
// 	}
// 
// 	public void setInterceptPoint(InterceptPoint point) {
// 		interceptPoint = point;
// 	}
// 
// 	public InterceptPoint getInterceptPoint() {
// 		return interceptPoint;
// 	}
// 
// 	public String getPackageName() {
// 		return packageName;
// 	}
// 
// 	public String getServiceName() {
// 		return serviceName;
// 	}
// 
// 	public String getFqname() {
// 		return fqname;
// 	}
// }
// 
// Path: src/main/java/org/wmaop/aop/interceptor/InterceptPoint.java
// public enum InterceptPoint {
// 		BEFORE,INVOKE,AFTER;
// 
// }
// 
// Path: src/main/java/org/wmaop/aop/matcher/FlowPositionMatcher.java
// public interface FlowPositionMatcher extends Matcher<FlowPosition> {
// 
// 	String getServiceName();
// 
// }
// 
// Path: src/main/java/org/wmaop/aop/matcher/MatchResult.java
// public class MatchResult {
// 
// 	public static final MatchResult FALSE = new MatchResult(false, "undefined");
// 	public static final MatchResult TRUE = new MatchResult(true, "undefined");
// 	
// 	private final boolean isMatch;
// 	private final String id;
// 
// 	public MatchResult(boolean result, String id) {
// 		this.id = id;
// 		isMatch = result;
// 	}
// 
// 	public boolean isMatch() {
// 		return isMatch;
// 	}
// 
// 	public String getId() {
// 		return id;
// 	}
// 	
// 	@Override
// 	public String toString() {
// 		return "MatchResult:"+isMatch+" for " + id;
// 	}
// }
// 
// Path: src/main/java/org/wmaop/aop/matcher/Matcher.java
// public interface Matcher<T> {
// 	MatchResult match(T value);
// 
// 	Map<String, Object> toMap();
// }


// Path: src/test/java/org/wmaop/aop/pointcut/ServicePipelinePointCutTest.java
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import org.junit.Before;
import org.junit.Test;
import org.wmaop.aop.interceptor.FlowPosition;
import org.wmaop.aop.interceptor.InterceptPoint;
import org.wmaop.aop.matcher.FlowPositionMatcher;
import org.wmaop.aop.matcher.MatchResult;
import org.wmaop.aop.matcher.Matcher;
import com.wm.data.IData;

package org.wmaop.aop.pointcut;




public class ServicePipelinePointCutTest {

	private FlowPosition pipelinePosition;
	private FlowPositionMatcher serviceNameMatcher;
	private IData idata;
	private Matcher<? super IData> pipelineMatcher;

	@Before
	@SuppressWarnings("unchecked")
	public void setUp() {
		pipelinePosition = mock(FlowPosition.class);
		serviceNameMatcher = mock(FlowPositionMatcher.class);
		idata = mock(IData.class);
		pipelineMatcher = mock(Matcher.class);