@Test
public void testToJSONArray() {

	AssetCategoryMetric assetCategoryMetric1 = new AssetCategoryMetric(
		RandomTestUtil.randomString(), RandomTestUtil.randomString(),
		RandomTestUtil.randomLong());
	AssetCategoryMetric assetCategoryMetric2 = new AssetCategoryMetric(
		RandomTestUtil.randomString(), RandomTestUtil.randomString(),
		RandomTestUtil.randomLong());
	AssetVocabularyMetric assetVocabularyMetric = new AssetVocabularyMetric(
		RandomTestUtil.randomString(), RandomTestUtil.randomString(),
		Arrays.asList(assetCategoryMetric1, assetCategoryMetric2));
	Assert.assertEquals(
		JSONUtil.putAll(
			JSONUtil.put(
				"key", assetCategoryMetric1.getKey()
			).put(
				"name", assetCategoryMetric1.getName()
			).put(
				"value", assetCategoryMetric1.getValue()
			).put(
				"vocabularyName", assetVocabularyMetric.getName()
			),
			JSONUtil.put(
				"key", assetCategoryMetric2.getKey()
			).put(
				"name", assetCategoryMetric2.getName()
			).put(
				"value", assetCategoryMetric2.getValue()
			).put(
				"vocabularyName", assetVocabularyMetric.getName()
			)
		).toString(),
		String.valueOf(assetVocabularyMetric.toJSONArray()));
}