use of org.openkilda.northbound.dto.v2.flows.FlowMirrorPointResponseV2 in project open-kilda by telstra.
the class FlowMapperTest method testFlowMirrorPointResponseToFlowMirrorPointCreatePayload.
@Test
public void testFlowMirrorPointResponseToFlowMirrorPointCreatePayload() {
FlowMirrorPointResponse response = FlowMirrorPointResponse.builder().flowId(FLOW_ID).mirrorPointId(MIRROR_POINT_ID_A).mirrorPointDirection(MIRROR_POINT_DIRECTION_A).mirrorPointSwitchId(SRC_SWITCH_ID).sinkEndpoint(FlowEndpoint.builder().switchId(DST_SWITCH_ID).portNumber(DST_PORT).outerVlanId(DST_VLAN).innerVlanId(DST_INNER_VLAN).build()).build();
FlowMirrorPointResponseV2 apiResponse = flowMapper.toFlowMirrorPointResponseV2(response);
assertEquals(response.getFlowId(), apiResponse.getFlowId());
assertEquals(response.getMirrorPointId(), apiResponse.getMirrorPointId());
assertEquals(response.getMirrorPointDirection(), apiResponse.getMirrorPointDirection());
assertEquals(response.getMirrorPointSwitchId(), apiResponse.getMirrorPointSwitchId());
assertEquals(response.getSinkEndpoint().getSwitchId(), apiResponse.getSinkEndpoint().getSwitchId());
assertEquals(response.getSinkEndpoint().getPortNumber(), apiResponse.getSinkEndpoint().getPortNumber());
assertEquals(response.getSinkEndpoint().getOuterVlanId(), apiResponse.getSinkEndpoint().getVlanId());
assertEquals(response.getSinkEndpoint().getInnerVlanId(), apiResponse.getSinkEndpoint().getInnerVlanId());
}
Aggregations