@Test
  public void getContentWhenException() throws Exception {
    LESSSkinFileResourceReference lessSkinFileResourceReference =
        new LESSSkinFileResourceReference("file.less", templateManager, skinManager);

    // Mocks
    Template template = mock(Template.class);
    when(templateManager.getTemplate("less/file.less", skin)).thenReturn(template);
    Exception exception = new Exception("exception");
    when(template.getContent()).thenThrow(exception);

    // Test
    LESSCompilerException caughtException = null;
    try {
      lessSkinFileResourceReference.getContent("skin");
    } catch (LESSCompilerException e) {
      caughtException = e;
    }

    // Verify
    assertNotNull(caughtException);
    assertEquals(
        "Failed to get the content of the template [file.less].", caughtException.getMessage());
    assertEquals(exception, caughtException.getCause());
  }
  @Test
  public void getContentWhenFileDoesNotExist() throws Exception {
    LESSSkinFileResourceReference lessSkinFileResourceReference =
        new LESSSkinFileResourceReference("not-existing-file.less", templateManager, skinManager);

    // Test
    LESSCompilerException caughtException = null;
    try {
      lessSkinFileResourceReference.getContent("skin");
    } catch (LESSCompilerException e) {
      caughtException = e;
    }

    // Verify
    assertNotNull(caughtException);
    assertEquals(
        "The template [not-existing-file.less] does not exists.", caughtException.getMessage());
  }