@@ -0,0 +1,1677 @@
+/*%0A * #%25L%0A * servo%0A * %25%25%0A * Copyright (C) 2011 - 2012 Netflix%0A * %25%25%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A * %0A *      http://www.apache.org/licenses/LICENSE-2.0%0A * %0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A * #L%25%0A */%0Apackage com.netflix.servo.publish;%0A%0Aimport com.google.common.collect.ImmutableList;%0Aimport com.google.common.collect.ImmutableMap;%0A%0Aimport java.util.List;%0Aimport java.util.Map;%0A%0Aimport org.testng.annotations.Test;%0A%0Aimport static org.testng.Assert.*;%0A%0Apublic class MemoryMetricObserverTest %7B%0A%0A    private final Map%3CString,String%3E EMPTY = ImmutableMap.of();%0A%0A    private List%3CMetric%3E mkList(int v) %7B%0A        return ImmutableList.of(new Metric(%22m%22, EMPTY, 0L, v));%0A    %7D%0A%0A    @Test%0A    public void testUpdate() throws Exception %7B%0A        MemoryMetricObserver mmo = new MemoryMetricObserver(%22test%22, 2);%0A        mmo.update(mkList(1));%0A        assertEquals(mmo.getObservations(), ImmutableList.of(mkList(1)));%0A    %7D%0A%0A    @Test%0A    public void testExceedN() throws Exception %7B%0A        MemoryMetricObserver mmo = new MemoryMetricObserver(%22test%22, 2);%0A        mmo.update(mkList(1));%0A        mmo.update(mkList(2));%0A        mmo.update(mkList(3));%0A        assertEquals(mmo.getObservations(),%0A            ImmutableList.of(mkList(2), mkList(3)));%0A    %7D%0A%7D%0A

add test case for MemoryMetricObserver