1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.neo4j.server.rrd;
21
22 import static org.hamcrest.MatcherAssert.assertThat;
23 import static org.hamcrest.Matchers.greaterThan;
24 import static org.hamcrest.Matchers.lessThan;
25
26
27 import java.io.IOException;
28
29 import javax.management.MalformedObjectNameException;
30
31 import org.junit.Before;
32 import org.junit.Test;
33
34 public class MemoryUsedSampleableTest {
35
36 MemoryUsedSampleable sampleable;
37
38 @Before
39 public void setUp() throws Exception
40 {
41 sampleable = new MemoryUsedSampleable();
42 }
43
44 @Test
45 public void memoryUsageIsBetweenZeroAndOneHundred() throws IOException, MalformedObjectNameException
46 {
47 assertThat( sampleable.getValue(), greaterThan( 0l ) );
48 assertThat( sampleable.getValue(), lessThan( 100l ) );
49 }
50
51 }