### Question:
InstallerDocument extends BaseDocument { public String getPluginId() { return pluginId; }  String getPluginId(); void setPluginId(final String pluginId); Calendar getDateInstalled(); void setDateInstalled(final Calendar dateInstalled); Calendar getDateAdded(); void setDateAdded(final Calendar dateAdded); boolean hasDateAdded(); String getInstallationState(); void setInstallationState(String installationState); boolean hasInstallationState(); @Override String toString();  }### Answer:
@Test public void testGetPluginId() throws Exception { final InstallerDocument document = new InstallerDocument(); final String pluginId = "foo.bar.zar.MyBean"; document.setName(pluginId); log.info("document {}", document); document.setPluginId("test.foo"); final Calendar today = Calendar.getInstance(); document.setDateInstalled(today); final TestPluginContext context = (TestPluginContext) getContext(); final InstallerDocument fetched; try (PluginConfigService manager = new FilePluginService(context)) { manager.write(document); fetched = manager.read(pluginId, InstallerDocument.class); } assertNotNull(fetched.getDateInstalled()); assertEquals(fetched.getDateInstalled().getTime(), today.getTime()); assertNotNull(fetched.getPluginId()); }