### Question:
HzTelcoRechargeContext extends TelcoRechargeContext { public static HzTelcoRechargeContext initialTelcoRecharge() { return new HzTelcoRechargeContext(newHashSet()); } @JsonCreator private  HzTelcoRechargeContext(@JsonProperty("acceptedPins") Set<String> acceptedPins); static HzTelcoRechargeContext initialTelcoRecharge(); static Set<String> getRequestedPins(Context context); @Override String toString();  }### Answer:
@Test public void test() throws Exception { final ObjectMapper mapper = new TransitionSerializer().mapper; final Transition transition = initialTransition("1", new InitialState(), newArrayList(initialTelcoRecharge().addAcceptedPin("333"))); byte[] data = mapper.writeValueAsBytes(transition); final Transition desTransition = mapper.readValue(new ByteArrayInputStream(data), Transition.class); assertThat(desTransition, is(notNullValue())); assertThat(desTransition.getContext().getContextsOfType(HzTelcoRechargeContext.class).size(), equalTo(1)); assertThat(desTransition.getContext().getContextsOfType(HzTelcoRechargeContext.class).get(0).getAcceptedPins().size(), equalTo(1)); }