public void createThenGetRiskRun() {
final UniqueId marketDataUid = _cycleMetadataStub.getMarketDataSnapshotId();
_batchMaster.createMarketData(marketDataUid);
final RiskRun run = _batchMaster.startRiskRun(_cycleMetadataStub, Maps.<String, String>newHashMap(), RunCreationMode.AUTO, SnapshotMode.PREPARED);
final RiskRun run2 = _batchWriter.getRiskRun(run.getObjectId());
assertNotNull(run2);
assertNotNull(run2.getCreateInstant());
assertNotNull(run2.getStartInstant());
assertNull(run2.getEndInstant());
assertNotNull(run2.getMarketData());
// Map<String, String> props = run2.getPropertiesMap();
//assertEquals(10, props.size());
//assertEquals("AD_HOC_RUN", props.getId("observationTime"));
//assertEquals(ZonedDateTime.ofInstant(run2.getCreateInstant(), ZoneOffset.UTC).toString(), props.getId("valuationTime"));
//assertEquals("test_view", props.getId("view"));
//assertEquals(ZonedDateTime.ofInstant(run2.getCreateInstant(), ZoneOffset.UTC).getZone().toString(), props.getId("timeZone"));
//assertEquals(ZonedDateTime.ofInstant(run2.getCreateInstant(), ZoneOffset.UTC).toLocalTime().toString(), props.getId("staticDataTime"));
//assertEquals(ZonedDateTime.ofInstant(run2.getCreateInstant(), ZoneOffset.UTC).toLocalTime().toString(), props.getId("configDbTime"));
// assertEquals("Manual run2 started on "
// + run2.getCreateInstant().toString()
// + " by "
// + System.getProperty("user.name"),
// props.getId("reason"));
// assertEquals(run2.getCreateInstant().toString(), props.getId("valuationInstant"));
// assertEquals(run2.getCreateInstant().toInstant().toString(), props.getId("configDbInstant"));
// assertEquals(run2.getCreateInstant().toString(), props.getId("staticDataInstant"));
//assertEquals(run2.getCreateInstant().toInstant(), _riskRun.getOriginalCreationTime());
// getId
final RiskRun run3 = _batchWriter.getRiskRun(run.getObjectId());
assertEquals(run2.getId(), run3.getId());
}