DataServiceVisitorJsBuilder extends AbstractDataServiceVisitor { boolean considerateAllArgs(JsCacheResult jcr) { return null == jcr || (jcr.keys().length != 0 && ASTERISK.equals(jcr.keys()[0])); } DataServiceVisitorJsBuilder(ProcessingEnvironment environment, FwkWriter fwk);   }
@Test public void testConsiderateNotAllArgs() { boolean result = instance.considerateAllArgs(null); assertThat(result).isTrue(); result = instance.considerateAllArgs(new JsCacheResultLiteral(new String[]{})); assertThat(result).isFalse(); result = instance.considerateAllArgs(new JsCacheResultLiteral()); assertThat(result).isFalse(); result = instance.considerateAllArgs(new JsCacheResultLiteral("a")); assertThat(result).isFalse(); result = instance.considerateAllArgs(new JsCacheResultLiteral("a", "b")); assertThat(result).isFalse(); result = instance.considerateAllArgs(new JsCacheResultLiteral("*")); assertThat(result).isTrue(); result = instance.considerateAllArgs(new JsCacheResultLiteral("*", "b")); assertThat(result).isTrue(); }