@Test
public void testLibraryVariationMatch() {

  IndexedRegularExpressionIncludeResolver resolver =
    new IndexedRegularExpressionIncludeResolver(PackageType.NdkComponent,
                                                "^(?<home>/path/to/ndk-bundle)(?<relative>/sources/android/native_app_glue(/.*))$",
                                                "Native App Glue");
  SimpleIncludeValue result = resolver.resolve(new File("/path/to/ndk-bundle/sources/android/native_app_glue"));
  assertThat(result).isNotNull();
  assertThat(result.getSimplePackageName()).isEqualTo("Native App Glue");
  assertThat(result.getRelativeIncludeSubFolder()).isEqualTo("/sources/android/native_app_glue/");
  assertThat(result.getIncludeFolder()).isEqualTo(new File("/path/to/ndk-bundle/sources/android/native_app_glue"));
}