Context { public static Context newContext(final Context parent, final Object model) { return newBuilder(parent, model).build(); } protected  Context(final Object model); @SuppressWarnings({"unchecked" }) Context combine(final String name, final Object model); @SuppressWarnings({"unchecked" }) Context combine(final Map<String, ?> model); @SuppressWarnings("unchecked") T data(final String name); Context data(final String name, final Object value); Context data(final Map<String, ?> attributes); final Object model(); final Context parent(); Set<Entry<String, Object>> propertySet(final Object context); Set<Entry<String, Object>> propertySet(); boolean isBlockParams(); Object get(final List<PathExpression> path); Object get(final String key); Object get(final String key, final boolean parentScopeResolution); void destroy(); @Override String toString(); static Builder newBuilder(final Context parent, final Object model); static Builder newBuilder(final Object model); static Context newContext(final Context parent, final Object model); static Context newBlockParamContext(final Context parent, final List<String> names,
      final List<Object> values); static Context newPartialContext(final Context ctx, final String scope,
      final Map<String, Object> hash); static Context newContext(final Object model); static Context copy(final Context context, final Object model); static final String PARTIALS; static final String INLINE_PARTIALS; static final String INVOCATION_STACK; static final String PARAM_SIZE; static final String CALLEE; }
@Test public void newContext() { Context context = Context.newContext("String"); assertNotNull(context); assertEquals("String", context.model()); }
@Test(expected = NullPointerException.class) public void nullParent() { Context.newContext(null, new Object()); }