@Test
public void validateDuplicateRoleDifferentEnv() throws Exception {
File root = TestDataProvider.getTestFile(new Path("testData/testRoles3/"));
ValidationService vs = getValidationService();
Diagnostic chain = new Diagnostic();
ValidationOptions options = getValidationOptions();
options.setCheckLayout(true);
options.setCheckModuleSemantics(true);
options.setCheckReferences(true);
options.setFileType(FileType.PUPPET_ROOT);
options.setSearchPath("modules/*:roles/production/*");
BuildResult buildResult = vs.validate(chain, root, options, null, SubMonitor.convert(null));
// Without constraint that only things on path are validated - there should be two redefinition errors
//
assertEquals("There should be no errors", 0, countErrors(chain));