public static List<SourceToTargetMapping> getCurrentMappings( List<String> sourceFields, List<String> targetFields, List<MappingValueRename> mappingValues ) {
    List<SourceToTargetMapping> sourceToTargetMapping = new ArrayList<>(  );

    if ( sourceFields == null || targetFields == null || mappingValues == null ) {
      return sourceToTargetMapping;
    }
    if ( !mappingValues.isEmpty() ) {
      for ( MappingValueRename mappingValue : mappingValues ) {
        String source = mappingValue.getSourceValueName();
        String target = mappingValue.getTargetValueName();
        int sourceIndex = sourceFields.indexOf( source );
        int targetIndex = targetFields.indexOf( target );
        sourceToTargetMapping.add( new SourceToTargetMapping( sourceIndex, targetIndex ) );
      }
    }
    return sourceToTargetMapping;
  }
@Test
  public void getCurrentMappingSourceNull() {
    List<SourceToTargetMapping> currentMapping = MappingUtil.getCurrentMappings( null, targetFields, mappingValues );
    assertEquals( 0, currentMapping.size() );
  }