### Question:
TransMetaJsonSerializer extends AbstractMetaJsonSerializer<TransMeta> { @Override protected void serializeHops( TransMeta meta, JsonGenerator json ) throws IOException { json.writeArrayFieldStart( JSON_PROPERTY_HOPS ); int numberOfHops = meta.nrTransHops(); for ( int i = 0; i < numberOfHops; i++ ) { TransHopMeta hopMeta = meta.getTransHop( i ); HopInfo hopInfo = new HopInfo( hopMeta ); json.writeObject( hopInfo ); } json.writeEndArray(); } TransMetaJsonSerializer( Class<TransMeta> aClass );  TransMetaJsonSerializer( JavaType javaType );  TransMetaJsonSerializer( Class<?> aClass, boolean b );   }### Answer:
@Test public void testSerializeHops() throws Exception { TransHopMeta hop = mock( TransHopMeta.class ); when( transMeta.nrTransHops() ).thenReturn( 1 ); when( transMeta.getTransHop( 0 ) ).thenReturn( hop ); serializer.serializeHops( transMeta, json ); verify( json ).writeArrayFieldStart( TransMetaJsonSerializer.JSON_PROPERTY_HOPS ); verify( json ).writeObject( any( HopInfo.class ) ); }