@Test
  public void supportedWhenAnnotationHasTemplateKey() {
    when(resource.isAnnotatedWith("template")).thenReturn(true);
    when(resource.getAnnotation("template")).thenReturn("aTemplateName");

    assertTrue(
        "Exp. the capability to be supported because it has the template annotation",
        capability.isSupported());
    assertEquals("Exp. to get the template name", "aTemplateName", capability.getTemplateName());
  }