/** Method description */
  @Test
  public void testResolveUnknownPermission() {
    RepositoryPermissionResolver resolver = new RepositoryPermissionResolver();
    RepositoryPermission p = resolver.resolvePermission("user:scm:read");

    assertNull(p);

    p = resolver.resolvePermission("group:asd:wRitE");
    assertNull(p);
  }
  /** Method description */
  @Test
  public void testResolveUnknownTypePermission() {
    RepositoryPermissionResolver resolver = new RepositoryPermissionResolver();
    RepositoryPermission p = resolver.resolvePermission("repository:scm:asd");

    assertNull(p);
  }
  /** Method description */
  @Test
  public void testResolvePermission() {
    RepositoryPermissionResolver resolver = new RepositoryPermissionResolver();
    RepositoryPermission p = resolver.resolvePermission("repository:scm:read");

    assertNotNull(p);
    assertEquals("scm", p.getRepositoryId());
    assertEquals(PermissionType.READ, p.getPermissionType());

    p = resolver.resolvePermission("repository:asd:wRitE");
    assertNotNull(p);
    assertEquals("asd", p.getRepositoryId());
    assertEquals(PermissionType.WRITE, p.getPermissionType());

    p = resolver.resolvePermission("repository:*:OWNER");
    assertNotNull(p);
    assertEquals("*", p.getRepositoryId());
    assertEquals(PermissionType.OWNER, p.getPermissionType());
  }