@Test public void testPreparationDefineField() throws Exception { assertThat( FieldAccessor.ofField(FOO).defineAs(TYPE).prepare(instrumentedType), is(instrumentedType)); verify(instrumentedType) .withField( new FieldDescription.Token(FOO, NO_MODIFIERS, new TypeDescription.ForLoadedType(TYPE))); verifyNoMoreInteractions(instrumentedType); }
@Test public void testPreparationPropertyAccessor() throws Exception { assertThat(FieldAccessor.ofBeanProperty().prepare(instrumentedType), is(instrumentedType)); verifyZeroInteractions(instrumentedType); }
@Test public void testPreparationNoDefineField() throws Exception { assertThat(FieldAccessor.ofField(FOO).prepare(instrumentedType), is(instrumentedType)); verifyZeroInteractions(instrumentedType); }