Fix build faliures due to OFPlugin checktyle fixes
[netvirt.git] / cloud-servicechain / cloud-servicechain-impl / src / test / java / org / opendaylight / netvirt / cloudservicechain / matchers / FlowEntityMatcher.java
1 /*
2  * Copyright (c) 2016 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.netvirt.cloudservicechain.matchers;
9
10 import org.mockito.ArgumentMatcher;
11 import org.opendaylight.genius.mdsalutil.FlowEntity;
12 import org.opendaylight.genius.mdsalutil.InstructionInfo;
13 import org.opendaylight.genius.mdsalutil.MatchInfo;
14
15 public class FlowEntityMatcher extends ArgumentMatcher<FlowEntity> {
16
17     FlowEntity expectedFlow;
18
19     public FlowEntityMatcher(FlowEntity expectedFlow) {
20         this.expectedFlow = expectedFlow;
21     }
22
23     public boolean sameMatch(MatchInfo match1, MatchInfo match2) {
24         // TODO: implement this
25         return true;
26     }
27
28     public boolean sameInstructions(InstructionInfo instructions1, InstructionInfo instructions2) {
29         // TODO: implement this
30         return true;
31     }
32
33     @Override
34     public boolean matches(Object actualFlow) {
35         if (! (actualFlow instanceof FlowEntity)) {
36             return false;
37         }
38         boolean result = true;
39         FlowEntity flow = (FlowEntity) actualFlow;
40 //      flow.getId() != null && flow.getId().equals(expectedFlow.getId())
41 //      && flow.getTableId() == expectedFlow.getTableId()
42 //      && StringUtils.equals(flow.getFlowName(), expectedFlow.getFlowName())
43 //      && sameInstructions(flow.getInstructions(), expectedFlow.getInstructions())
44 //      && sameMatch(flow.getMatch(), expectedFlow.getMatch());
45         return result;
46     }
47
48 }