Esempio n. 1
0
 @Override
 public List<Object> apply(List<Object> arguments) {
   Resume r = new Resume();
   LinkedList<Object> l = new LinkedList<Object>();
   l.add(thread);
   for (Object o : arguments) {
     l.add(o);
   }
   return r.apply(l);
 }
  public static void main(String[] args) throws CloneNotSupportedException {
    Resume resume = new Resume("大刘");
    resume.setPersonInfo("男", "22");
    resume.setWorkExperience("2015.8.3-2015.12.11", "千锋");

    Resume resume2 = (Resume) resume.clone();
    resume2.setPersonInfo("male", "19");
    resume2.setWorkExperience("2015.10.1-1.15.12.22", "百度");

    resume.display();
    resume2.display();
  }
  @Test
  public void testIsReceive() {
    CommonReceiveHandler handler = new CommonReceiveHandler();

    Assert.assertFalse(handler.isReceive(null));
    Assert.assertFalse(handler.isReceive("not"));
    Assert.assertTrue(handler.isReceive(CallHelp.response()));
    Assert.assertTrue(handler.isReceive(CallHold.response()));
    Assert.assertTrue(handler.isReceive(Logout.response()));
    Assert.assertTrue(handler.isReceive(MobileNumberCancel.response()));
    Assert.assertTrue(handler.isReceive(MobileNumber.response()));
    Assert.assertTrue(handler.isReceive(OutCallCancel.response()));
    Assert.assertTrue(handler.isReceive(OutCall.response()));
    Assert.assertTrue(handler.isReceive(Rest.response()));
    Assert.assertTrue(handler.isReceive(Resume.response()));
    Assert.assertTrue(handler.isReceive(Silence.response()));
    Assert.assertTrue(handler.isReceive(Status.response()));
    Assert.assertTrue(handler.isReceive(TransferGroup.response()));
    Assert.assertTrue(handler.isReceive(TransferOne.response()));
  }