@Test
  public void baseDirectoryShouldBeTokenisedInDescriptor() {
    unit.setLocation(PROJECT_PATH + "/a-path/to/checkstyle.xml");

    assertThat(
        unit.getDescriptor(),
        is(equalTo("FILE:$PROJECT_DIR$/a-path/to/checkstyle.xml:aDescription")));
  }
  @Before
  public void setUp() {
    unit = new FileConfigurationLocation(project);
    unit.setLocation("aLocation");
    unit.setDescription("aDescription");

    when(project.getBaseDir()).thenReturn(projectBase);
    when(projectBase.getPath()).thenReturn(PROJECT_PATH);
  }
  @Test
  public void locationShouldBeDetokenisedCorrectly() {
    unit.setLocation(PROJECT_PATH + "/a-path/to/checkstyle.xml");

    assertThat(unit.getLocation(), is(equalTo(PROJECT_PATH + "/a-path/to/checkstyle.xml")));
  }
 @Test
 public void descriptorShouldContainsTypeLocationAndDescription() {
   assertThat(unit.getDescriptor(), is(equalTo("FILE:aLocation:aDescription")));
 }