public static Collection<Object[]> data() throws Exception {
String baseZnode = Base.createBaseZNode();
return Arrays.asList(new Object[][] {
{MediaType.APPLICATION_JSON, baseZnode, "utf8",
ClientResponse.Status.OK, new ZStat(baseZnode, null, null) },
{MediaType.APPLICATION_JSON, baseZnode, "utf8",
ClientResponse.Status.OK, new ZStat(baseZnode, null, "") },
{MediaType.APPLICATION_JSON, baseZnode, "utf8",
ClientResponse.Status.OK, new ZStat(baseZnode, null, "foo") },
{MediaType.APPLICATION_JSON, baseZnode, "base64",
ClientResponse.Status.OK, new ZStat(baseZnode, null, null) },
{MediaType.APPLICATION_JSON, baseZnode, "base64",
ClientResponse.Status.OK, new ZStat(baseZnode, "".getBytes(), null) },
{MediaType.APPLICATION_JSON, baseZnode, "base64",
ClientResponse.Status.OK, new ZStat(baseZnode, "".getBytes(), null) },
{MediaType.APPLICATION_JSON, baseZnode, "base64",
ClientResponse.Status.OK, new ZStat(baseZnode, "foo".getBytes(), null) },
{MediaType.APPLICATION_JSON, baseZnode + "abaddkdk", "utf8",
ClientResponse.Status.NOT_FOUND, null },
{MediaType.APPLICATION_JSON, baseZnode + "abaddkdk", "base64",
ClientResponse.Status.NOT_FOUND, null },
{MediaType.APPLICATION_XML, baseZnode, "utf8",
ClientResponse.Status.OK, new ZStat(baseZnode, null, "foo") },
{MediaType.APPLICATION_XML, baseZnode, "base64",
ClientResponse.Status.OK,
new ZStat(baseZnode, "foo".getBytes(), null) },
{MediaType.APPLICATION_XML, baseZnode + "abaddkdk", "utf8",
ClientResponse.Status.NOT_FOUND, null },
{MediaType.APPLICATION_XML, baseZnode + "abaddkdk", "base64",
ClientResponse.Status.NOT_FOUND, null }