PutMethodChecker extends MethodCheckOperator implements ConditionChecker { @Override public boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameterList) { return isExpectedMethod(MethodEnum.PUT, request.getRequestLine()); }  @Override boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameterList);  }
@Test public void testCheckConditionShouldReturnTrueWhenRequestWhatWeExpect() { given(paramList.getAllParameters()).willReturn(params); given(request.getRequestLine()).willReturn("PUT BLAH"); boolean actual = underTest.checkCondition(request, paramList); assertTrue(actual); }
@Test public void testCheckConditionShouldReturnFalseWhenRequestWhatWeDoNotExpect() { given(paramList.getAllParameters()).willReturn(params); given(request.getRequestLine()).willReturn("GET BLAH"); boolean actual = underTest.checkCondition(request, paramList); assertFalse(actual); }