@Test
public void configure() throws MalformedObjectNameException {

    JmxExecRequest req =
            new JmxRequestBuilder(EXEC,"test:type=exec")
                    .operation("op")
                    .build();
    store.configure(new HistoryKey(req), new HistoryLimit(2, 0L));
    assertEquals("2 history entries",2,updateNTimesAsList(req,3).size());
    store.configure(new HistoryKey(req), new HistoryLimit(4, 0L));
    assertEquals("4 history entries",4,updateNTimesAsList(req,5).size());
    store.configure(new HistoryKey(req), new HistoryLimit(12, 0L));
    assertEquals("10 history entries (max. for store)",10,updateNTimesAsList(req,10).size());
    store.setGlobalMaxEntries(20);
    assertEquals("Read max entries",20,store.getGlobalMaxEntries());
    assertEquals("20 history entries (max. for store)",20,updateNTimesAsList(req,30).size());
    store.reset();
    store.configure(new HistoryKey(req), new HistoryLimit(20, 0L));
    /** 5 fresh updates yield 4 history entries returned (and 5 stored) */
    assertEquals("4 history entries after reset",4,updateNTimesAsList(req,5).size());
    store.configure(new HistoryKey(req), null);
    assertEquals("History disabled",null,updateNTimesAsList(req,12));
}