WidgetDirectiveBuilder extends AbstractLiveFileBuilder { @Override public boolean isBuildable(String path) { return path.endsWith(".json") && !path.contains(".metadata"); } @Inject  WidgetDirectiveBuilder(Watcher watcher, WidgetFileBasedLoader widgetLoader, HtmlSanitizer htmlSanitizer); @Override void build(Path jsonPath); @Override boolean isBuildable(String path);  }
@Test public void should_exclude_metadata_from_the_build() throws Exception { boolean isBuildable = widgetDirectiveBuilder.isBuildable(".metadata/123.json"); assertThat(isBuildable).isFalse(); }