@Test
public void testGetUserNameMatcherPostInUri() throws Exception {

  // Given
  String uri = "/aaa/users/user1@domain/privileges";
  // When
  Matcher m = filter.getUserNameMatcher(uri);
  boolean isMatch = m.find();
  String pre = isMatch ? m.group("pre") : null;
  String userName = isMatch ? m.group("username") : null;
  String post = isMatch ? m.group("post") : null;
  // Then
  assertTrue(isMatch);
  assertEquals("/aaa/users/", pre);
  assertEquals("user1@domain", userName);
  assertEquals("/privileges", post);
}