  @Test
  public void testFromJson() throws IOException {

    String json =  "{\n" +
                   "  \"type\" : \"JOB_STARTED\",\n" +
                   "  \"payload\" : {\n" +
                   "    \"name\" : \"scope-29\",\n" +
                   "    \"job\" : {\n" +
                   "      \"runtime\" : \"default\",\n" +
                   "      \"id\" : \"job_local_0001\",\n" +
                   "      \"aliases\" : [ \"A\", \"AA\", \"B\", \"C\" ],\n" +
                   "      \"features\" : [ \"GROUP_BY\", \"COMBINER\", \"MAP_PARTIALAGG\" ],\n" +
                   "      \"metrics\" : { \n" +
                   "            \"somemetrics\" : 111 \n" +
                   "        } \n " +
                   "    },\n" +
                   "    \"successorNames\" : [ ]\n" +
                   "  },\n" +
                   "  \"id\" : 1,\n" +
                   "  \"timestamp\" : 1373560988033\n" +
                   "}";
    Event event = Event.fromJson(json);
    Job job = ((DAGNode<Job>)event.getPayload()).getJob();
    assertEquals("job_local_0001", job.getId());
    assertEquals(111, job.getMetrics().get("somemetrics"));
  }