DslUtils { public static boolean resolved(final Object... args) { if (args == null) return true; return resolved(Arrays.asList(args)); }  static boolean resolved(final Object... args); static boolean resolved(Iterable<?> args); static Optional<Object> resolveBrooklynDslValue(Object originalValue, @Nullable TypeToken<?> desiredType, @Nullable ManagementContext mgmt, @Nullable AbstractBrooklynObjectSpec<?,?> specForCatalogItemIdContext); @SuppressWarnings("unchecked") static Optional<T> resolveNonDeferredBrooklynDslValue(Object originalValue, @Nullable TypeToken<T> desiredType, @Nullable ManagementContext mgmt, @Nullable AbstractBrooklynObjectSpec<?,?> specForCatalogItemIdContext);  }
@Test public void testResolved() throws Exception { assertTrue(DslUtils.resolved()); assertTrue(DslUtils.resolved((Object)null)); assertTrue(DslUtils.resolved((List<?>)null)); assertTrue(DslUtils.resolved(ImmutableList.of())); assertTrue(DslUtils.resolved(MutableList.of(null))); assertTrue(DslUtils.resolved(1, "a", ImmutableList.of("b"), ImmutableMap.of("c", "d"))); assertFalse(DslUtils.resolved(deferredVal)); assertFalse(DslUtils.resolved(ImmutableList.of(deferredVal))); }
@Test(groups="Broken") public void testResolvedDetectionInNestedCollections() throws Exception { assertFalse(DslUtils.resolved(ImmutableList.of(ImmutableList.of(deferredVal)))); assertFalse(DslUtils.resolved(ImmutableList.of(ImmutableMap.of(deferredVal, "myval")))); assertFalse(DslUtils.resolved(ImmutableList.of(ImmutableMap.of("mykey", deferredVal)))); }