RepositoryResourceDefinition extends BaseResourceDefinition { @Override public Collection<String> getCreateDirectives() { return Sets.newHashSet(VALIDATE_ONLY_DIRECTIVE); } RepositoryResourceDefinition(); @Override String getPluralName(); @Override String getSingularName(); @Override Collection<String> getCreateDirectives(); static String VALIDATE_ONLY_DIRECTIVE; }
@Test public void testGetCreateDirectives() throws Exception { final RepositoryResourceDefinition resourceDefinition = new RepositoryResourceDefinition(); final Collection<String> createDirectives = resourceDefinition.getCreateDirectives(); Assert.assertEquals(1, createDirectives.size()); Assert.assertEquals(RepositoryResourceDefinition.VALIDATE_ONLY_DIRECTIVE, createDirectives.iterator().next()); }