StringMetadataValue metadataValue = new StringMetadataValue("owner", "bobby");
TreeNodeMetadataValue node = new TreeNodeMetadataValue("container",
Collections.<MetadataValue>singletonList(metadataValue));
JSONObject jsonObject = node.toJson();
when(request.getParameter(eq("job"))).thenReturn(job);
PowerMockito.when(CliUtils.getContainer(null, job, null, false)).thenReturn(container);
when(container.toJson()).thenReturn(jsonObject);