??????. Jmockit???飺

????JMockit ??????????????????д??????????鶴???API??????https??//code.google.com/p/jmockit/????????? Java 5 SE ?? java.lang.instrument ?????????????? ASM ???????Java??Bytecode?????????????instrument????????????????????????????????

????Jmockit????mock????????????1.class(abstract?? final?? static) ??2.interface ??3.enum ??4.annotation ??5.native ??

????Jmockit ??????mock??????

????1. Behavior-oriented(Expectations & Verifications)  ??

????2. State-oriented(MockUp<GenericType>)   ??

??????????Behavior-oriented??????????mock????mock????????????????£??????в????State-oriented ?????????mock?????????????????????????????????????м?顢?????????Щ??????????С???State-oriented?? new MockUp?????????mock?κδ???????????????

??????????jmockit??APIs??tools??

???????????jmockit?????Expectation??NonStrictExpectations ??????? ??Annotation @Tested??@Mocked??@NonStrict??@Injectable ?????mock??????????jmockit ???????code coverage??????????UT????????????????????á?

??????.Jmockit???????

??????????????jmockit??jar??????

??????refund????????????У???????????pom??????jmockit??jar???????????????jmockit?????code coverage??jar??

????????????????????Jmockit???????