@Test public void shouldPassValidationWhenNoValidationRules() { // given sut = new CommandSchemaValidator( SchemaValidationRule.emptyValidationRules(), new ArrayList<ParameterValueValidator>()); Map<String, String> someMap = new HashMap<String, String>(); // and someMap.put("paramOne", "value one"); someMap.put("paramTwo", "value 2"); someMap.put("param3", "value 3"); // when sut.validateCommandSchema(someMap); sut.validateCommandSchema(new HashMap<String, String>()); // then no exception expected }