@Test public void testReCreate() throws Exception { SimpleEvent simple = new SimpleEvent(); simple.setData(DesCrypter.encrypt(new Gson().toJson(person))); Object obj = new EncryptEventCreator().reCreate(simple, Person.class); assertTrue(obj instanceof Person); Person p = (Person) obj; assertEquals(p.getAge(),person.getAge()); assertEquals(p.getName(),person.getName()); }
public void setData(String data) { this.data = data; }
SimpleEvent { public void setData(String data) { this.data = data; } }
SimpleEvent { public void setData(String data) { this.data = data; }  }
SimpleEvent { public void setData(String data) { this.data = data; }  void setId(long id); String getMark(); void setMark(String mark); Date getCreatedTime(); void setCreatedTime(Date createdTime); Date getModifiedTime(); void setModifiedTime(Date modifiedTime); String getData(); void setData(String data); int getStatus(); void setStatus(int status); String getExpression(); void setExpression(String expression); long getId(); String getType(); void setType(String type); EventHandler getEventHandler(); void setEventHandler(EventHandler eventHandler); }
SimpleEvent { public void setData(String data) { this.data = data; }  void setId(long id); String getMark(); void setMark(String mark); Date getCreatedTime(); void setCreatedTime(Date createdTime); Date getModifiedTime(); void setModifiedTime(Date modifiedTime); String getData(); void setData(String data); int getStatus(); void setStatus(int status); String getExpression(); void setExpression(String expression); long getId(); String getType(); void setType(String type); EventHandler getEventHandler(); void setEventHandler(EventHandler eventHandler);  }