// void setIncludeDirs(Collection<IPath> includeDirs)
// throws BackingStoreException;
@Test
public void setIncludeDirs() throws Exception {
File externalFile = null;
final IErlProject aProject = project2;
final Collection<IPath> includeDirs = aProject.getProperties().getIncludeDirs();
try {
// given
// an erlang project and an external file not in any project
final String externalFileName = "external.hrl";
externalFile = createTmpFile(externalFileName, "-define(E, hej).\n");
final String absolutePath = externalFile.getAbsolutePath();
final List<IPath> newIncludeDirs = Lists.newArrayList(includeDirs);
aProject.open(null);
final Collection<IErlModule> otpIncludes = aProject.getExternalIncludes();
final IPath absoluteDir = new Path(absolutePath).removeLastSegments(1);
newIncludeDirs.add(absoluteDir);
((ErlProject) aProject).setIncludeDirs(newIncludeDirs);
aProject.open(null);
// when
// fetching all external includes
final Collection<IErlModule> externalIncludes = aProject
.getExternalIncludes();
// then
// the external file should be returned
final Set<IErlModule> otpSet = Sets.newHashSet(otpIncludes);
final Set<IErlModule> externalSet = Sets.newHashSet(externalIncludes);