static Map<TargetStepAttribute, SourceStepField> convertToMap( List<MetaInjectMapping> metaInjectMapping ) {
    Map<TargetStepAttribute, SourceStepField> targetToSourceMap = new HashMap<TargetStepAttribute, SourceStepField>();
    for ( MetaInjectMapping mappingEntry : metaInjectMapping ) {
      if ( !isMappingEntryFilled( mappingEntry ) ) {
        continue;
      }
      TargetStepAttribute targetStepAttribute = createTargetStepAttribute( mappingEntry );
      SourceStepField sourceStepField = createSourceStepField( mappingEntry );
      targetToSourceMap.put( targetStepAttribute, sourceStepField );
    }
    return targetToSourceMap;
  }
@Test
  public void convertToMap() {
    MetaInjectMapping metaInjectMapping = new MetaInjectMapping();
    metaInjectMapping.setSourceStep( SOURCE_STEP_NAME );
    metaInjectMapping.setSourceField( SOURCE_FIELD_NAME );
    metaInjectMapping.setTargetStep( TARGET_STEP_NAME );
    metaInjectMapping.setTargetField( TARGET_FIELD_NAME );

    Map<TargetStepAttribute, SourceStepField> actualResult =
        MetaInjectMeta.convertToMap( Collections.singletonList( metaInjectMapping ) );

    assertEquals( 1, actualResult.size() );

    TargetStepAttribute targetStepAttribute = actualResult.keySet().iterator().next();
    assertEquals( TARGET_STEP_NAME, targetStepAttribute.getStepname() );
    assertEquals( TARGET_FIELD_NAME, targetStepAttribute.getAttributeKey() );

    SourceStepField sourceStepField = actualResult.values().iterator().next();
    assertEquals( SOURCE_STEP_NAME, sourceStepField.getStepname() );
    assertEquals( SOURCE_FIELD_NAME, sourceStepField.getField() );
  }