@@ -0,0 +1,1536 @@
+package net.blackshard.clarity.scribe;%0A%0Aimport static org.hamcrest.CoreMatchers.equalTo;%0Aimport static org.junit.Assert.*;%0A%0Aimport org.junit.Rule;%0Aimport org.junit.After;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport java.io.IOException;%0Aimport java.util.LinkedHashMap;%0A%0A/**%0A * Unit test for VMStatParser.%0A */%0Apublic class VMStatScribbletsTest %7B%0A    @Test public void shouldInitializeDistinctClasses() throws IOException %7B%0A        LinkedHashMap%3CVMStatField, Integer%3E cpuStats = new LinkedHashMap();%0A        LinkedHashMap%3CVMStatField, Integer%3E memStats = new LinkedHashMap();%0A        LinkedHashMap%3CString, Integer%3E cpuMetrics;%0A        LinkedHashMap%3CString, Integer%3E memMetrics;%0A%0A        VMStatScribblet cpu = new CPUScribblet();%0A        VMStatScribblet mem = new MemScribblet();%0A%0A        cpuStats.put(VMStatField.CPU_USER, 1);%0A        cpuStats.put(VMStatField.CPU_SYS, 2);%0A        cpuStats.put(VMStatField.CPU_IDLE, 97);%0A        memStats.put(VMStatField.MEM_SWAP, 50);%0A        memStats.put(VMStatField.MEM_FREE, 100);%0A%0A        cpuMetrics = cpu.toMetricsMap(cpuStats);%0A        memMetrics = mem.toMetricsMap(memStats);%0A%0A        assertThat(cpu.name, equalTo(%22CPU Scribblet%22));%0A        assertThat(mem.name, equalTo(%22Memory Scribblet%22));%0A        assertThat(cpuMetrics.get(%22user%22), equalTo(1));%0A        assertThat(cpuMetrics.get(%22system%22), equalTo(2));%0A        assertThat(cpuMetrics.get(%22idle%22), equalTo(97));%0A        assertThat(memMetrics.get(%22swap%22), equalTo(50));%0A        assertThat(memMetrics.get(%22free%22), equalTo(100));%0A    %7D%0A%7D%0A

Add test to ensure VMStat Scribblets extend properly