@Test
public void shouldConvertCastOfShortToShortValue() {

    RuleContext context = createContext();
    context.addDeclaration("$interimVar", int.class);
    String rewritten = new PrimitiveTypeConsequenceRewrite(context)
            .rewrite("{ $address.setShortNumber((short)$interimVar); }");
    assertThat(rewritten,
               equalToIgnoringWhiteSpace("{ $address.setShortNumber($interimVar.shortValue()); }"));
}