@Test
public void shouldLoadASchemaFromTheFileSystemByItsNameAndValidate() throws Exception {

    final String actionName = "example.action-name";
    final String envelopeJson = "{\"envelope\": \"json\"}";
    final JSONObject payload = mock(JSONObject.class);
    final Schema schema = mock(Schema.class);
    when(payloadExtractor.extractPayloadFrom(envelopeJson)).thenReturn(payload);
    when(jsonSchemaLoader.loadSchema(actionName)).thenReturn(schema);
    fileBasedJsonSchemaValidator.validateWithoutSchemaCatalog(envelopeJson, actionName);
    verify(schema).validate(payload);
}