@Test
public void testValidReference() {

	new Expectations() {{
		Map<String, Class<?>> argTypes = new HashMap<>();
		argTypes.put("key1", String.class);
		descriptionManager.getByName(SourceAdapterFactory.NAME_JSON_SOURCE_ADAPTER);
		result = Deencapsulation.newInnerInstance(Specification.class, SourceAdapterFactory.NAME_JSON_SOURCE_ADAPTER, ProcessorType.SOURCE_ADAPTER, argTypes);
		argTypes = new HashMap<>();
		argTypes.put("key2", Integer.class);
		descriptionManager.getByName(FilterFactory.NAME_DB_INSERTION_FILTER);
		result = Deencapsulation.newInnerInstance(Specification.class, FilterFactory.NAME_DB_INSERTION_FILTER, ProcessorType.FILTER, argTypes);
		argTypes = new HashMap<>();
		argTypes.put("key3", Boolean.class);
		descriptionManager.getByName(FilterFactory.NAME_NOTIFICATION_FILTER);
		result = Deencapsulation.newInnerInstance(Specification.class, FilterFactory.NAME_NOTIFICATION_FILTER, ProcessorType.FILTER, argTypes);
	}};
	ProcessorReferenceChainDescription reference = new ProcessorReferenceChainDescription(
			Arrays.asList(jsonSourceFilter, dbInsertionFilter, notificationFilter),
			new ExecutionInterval(2, TimeUnit.SECONDS));
	Assert.assertTrue(validator.isValid(reference, context));
}