@SuppressWarnings({ "unchecked", "rawtypes" })

@Test
public void testNewMatchExistingTemplate() throws Exception {
	URI uri = URI.createFileURI("foo/test.properties");
	PropertyFileDescriptor descriptor = getFixture().createDescriptor(template, uri);
	template.getDescriptors().add(descriptor);
	Resolvable folder = PropertyResourceUtil.getOrCreateFolder(template, "foo");
	folder.getChildren().add(descriptor);
	uri = URI.createFileURI("foo/test_de.properties");
	PropertyFileDescriptor translationDescriptor = getFixture().createDescriptor(translation, uri);
	translation.getDescriptors().add(translationDescriptor);
	folder = PropertyResourceUtil.getOrCreateFolder(translation, "foo");
	folder.getChildren().add(translationDescriptor);
	translationDescriptor.setMaster(descriptor);
	getFixture().newMatch(new File("workspace/test/master/foo/test.properties"));
	assertEquals("Must not be added again",1,template.getChild("foo").getChildren().size());
	assertEquals("Must not be added again",1,translation.getChild("foo").getChildren().size());
}