### Question:
ManagedVariable extends Variable<T> { private ManagedVariable(String name, Set<String> tags, String doc, boolean expand, T value, String namespace) { super(name, tags, doc, expand, namespace); this.value = value; } private  ManagedVariable(String name, Set<String> tags, String doc, boolean expand, T value, String namespace); static Builder<T> builder(); static Builder<T> builder(String namespace); void set(T value); @Override Long getLastUpdated(); T getValue();  }### Answer:
@Test public void testManagedVariable() { ManagedVariable<Integer> var1 = ManagedVariable.<Integer>builder().setName("var1").setValue(524).build(); Assert.assertEquals(524, (int) var1.getValue()); var1.clock = testClock; var1.set(524); exporter.export(var1); Assert.assertEquals(524, (int) exporter.getValue("var1")); Assert.assertEquals(0L, (long) var1.getLastUpdated()); curTime = 100L; var1.set(999); Assert.assertEquals(999, (int) exporter.getValue("var1")); Assert.assertEquals(100L, (long) var1.getLastUpdated()); Assert.assertEquals("", exporter.getVariable("var1").getDoc()); Assert.assertEquals(false, exporter.getVariable("var1").isExpandable()); StringWriter out = new StringWriter(); exporter.dump(new PrintWriter(out, true), true); Assert.assertThat(Lists.newArrayList(out.toString().split("\n")), Matchers.containsInAnyOrder("", "# (last update: 100)", "var1=999") ); }