### Question:
TypeCasting implements StackManipulation { public Size apply(MethodVisitor methodVisitor, Implementation.Context implementationContext) { methodVisitor.visitTypeInsn(Opcodes.CHECKCAST, typeDescription.getInternalName()); return StackSize.ZERO.toIncreasingSize(); } protected  TypeCasting(TypeDescription typeDescription); static StackManipulation to(TypeDefinition typeDefinition); boolean isValid(); Size apply(MethodVisitor methodVisitor, Implementation.Context implementationContext);  }### Answer:
@Test public void testCasting() throws Exception { when(typeDescription.getInternalName()).thenReturn(FOO); StackManipulation.Size size = new TypeCasting(typeDescription).apply(methodVisitor, implementationContext); assertThat(size.getSizeImpact(), is(0)); assertThat(size.getMaximalSize(), is(0)); verify(methodVisitor).visitTypeInsn(Opcodes.CHECKCAST, FOO); verifyNoMoreInteractions(methodVisitor); verifyZeroInteractions(implementationContext); }