private void testMatch(RequestMethodsRequestCondition condition, RequestMethod method) throws Exception { ServerWebExchange exchange = createExchange(method.name()); RequestMethodsRequestCondition actual = condition.getMatchingCondition(exchange); assertNotNull(actual); assertEquals(Collections.singleton(method), actual.getContent()); }
@Test public void combine() { RequestMethodsRequestCondition condition1 = new RequestMethodsRequestCondition(GET); RequestMethodsRequestCondition condition2 = new RequestMethodsRequestCondition(POST); RequestMethodsRequestCondition result = condition1.combine(condition2); assertEquals(2, result.getContent().size()); }