// Path: src/main/java/org/kew/rmf/transformers/authors/ShrunkAuthors.java
// public class ShrunkAuthors implements Transformer {
// 
// 	private DotFDotCleaner dotFDotCleaner = new DotFDotCleaner();
// 	private SurnameExtractor surnameExtractor = new SurnameExtractor();
// 
// 	private StripBasionymAuthorTransformer stripBasionymAuthor =new StripBasionymAuthorTransformer();
// 	private StripPublishingAuthorTransformer stripPublishingAuthor = new StripPublishingAuthorTransformer();
// 
// 	private Pattern inEx = Pattern.compile(StripExAuthorTransformer.EX_MARKER_REGEX + "|" + StripInAuthorTransformer.IN_MARKER_REGEX);
// 
// 	private SqueezeWhitespaceTransformer shrinkWhitespace = new SqueezeWhitespaceTransformer();
// 	private StripNonAlphanumericCharactersTransformer safeStripNonAlphanumerics = new StripNonAlphanumericCharactersTransformer();
// 
// 	private StringShrinkerTransformer stringShrinker = new StringShrinkerTransformer();
// 
// 	@Override
// 	public String transform(String s) {
// 		if (s == null) return null;
// 
// 		s = dotFDotCleaner.transform(s);
// 		s = surnameExtractor.transform(s);
// 
// 		String pub = stripBasionymAuthor.transform(s);
// 		String bas = stripPublishingAuthor.transform(s);
// 
// 		List<String> surnames = new ArrayList<>();
// 		for (String authors : new String[] {bas, pub}) {
// 			authors = inEx.matcher(authors).replaceAll(" ");
// 			authors = shrinkWhitespace.transform(authors);
// 			authors = safeStripNonAlphanumerics.transform(authors);
// 			for (String author : authors.split(" ")) {
// 				// shrink each identified author surname to shrinkTo if set
// 				author = stringShrinker.transform(author);
// 				author = author.trim();
// 				if (author.length() > 0) {
// 					surnames.add(author);
// 				}
// 			}
// 		}
// 		return StringUtils.join(surnames, " ").toLowerCase(Locale.ENGLISH);
// 	}
// 
// 	public Integer getShrinkTo() {
// 		return stringShrinker.getLength();
// 	}
// 	public void setShrinkTo(int shrinkTo) {
// 		stringShrinker.setLength(shrinkTo);
// 	}
// }


import static org.junit.Assert.*;
import org.junit.Test;
import org.kew.rmf.transformers.authors.ShrunkAuthors;
    }

    @Test
    public void need_to_deal_with_diacrits() {
        ShrunkAuthors transformer = new ShrunkAuthors();
        transformer.setShrinkTo(4);
        String author = "H.Baumann & Künkele";
        assertEquals("baum kunk", transformer.transform(author));
    }

    // TODO: make work (if it really makes sense..);
//    @Test
//    public void need_to_recognise_that_this_is_only_a_single_author_no_ampisand_or_comma1() {
//        ShrunkAuthors transformer = new ShrunkAuthors();
//        transformer.setShrinkTo(4);
//        String author = "Soto Arenas";
//        assertEquals("soto", transformer.transform(author));
//    }

    @Test
    public void ex_author_and_short_author() {
        ShrunkAuthors transformer = new ShrunkAuthors();
        transformer.setShrinkTo(3);
        String author = "L. ex Somebody";
        assertEquals("l som", transformer.transform(author));
    }

    @Test
    public void ex_and_in() {
        ShrunkAuthors transformer = new ShrunkAuthors();
// Path: src/main/java/org/kew/rmf/transformers/authors/ShrunkAuthors.java
// public class ShrunkAuthors implements Transformer {
// 
// 	private DotFDotCleaner dotFDotCleaner = new DotFDotCleaner();
// 	private SurnameExtractor surnameExtractor = new SurnameExtractor();
// 
// 	private StripBasionymAuthorTransformer stripBasionymAuthor =new StripBasionymAuthorTransformer();
// 	private StripPublishingAuthorTransformer stripPublishingAuthor = new StripPublishingAuthorTransformer();
// 
// 	private Pattern inEx = Pattern.compile(StripExAuthorTransformer.EX_MARKER_REGEX + "|" + StripInAuthorTransformer.IN_MARKER_REGEX);
// 
// 	private SqueezeWhitespaceTransformer shrinkWhitespace = new SqueezeWhitespaceTransformer();
// 	private StripNonAlphanumericCharactersTransformer safeStripNonAlphanumerics = new StripNonAlphanumericCharactersTransformer();
// 
// 	private StringShrinkerTransformer stringShrinker = new StringShrinkerTransformer();
// 
// 	@Override
// 	public String transform(String s) {
// 		if (s == null) return null;
// 
// 		s = dotFDotCleaner.transform(s);
// 		s = surnameExtractor.transform(s);
// 
// 		String pub = stripBasionymAuthor.transform(s);
// 		String bas = stripPublishingAuthor.transform(s);
// 
// 		List<String> surnames = new ArrayList<>();
// 		for (String authors : new String[] {bas, pub}) {
// 			authors = inEx.matcher(authors).replaceAll(" ");
// 			authors = shrinkWhitespace.transform(authors);
// 			authors = safeStripNonAlphanumerics.transform(authors);
// 			for (String author : authors.split(" ")) {
// 				// shrink each identified author surname to shrinkTo if set
// 				author = stringShrinker.transform(author);
// 				author = author.trim();
// 				if (author.length() > 0) {
// 					surnames.add(author);
// 				}
// 			}
// 		}
// 		return StringUtils.join(surnames, " ").toLowerCase(Locale.ENGLISH);
// 	}
// 
// 	public Integer getShrinkTo() {
// 		return stringShrinker.getLength();
// 	}
// 	public void setShrinkTo(int shrinkTo) {
// 		stringShrinker.setLength(shrinkTo);
// 	}
// }


// Path: src/test/java/org/kew/rmf/transformers/authors/ShrunkAuthorsTest.java
import static org.junit.Assert.*;
import org.junit.Test;
import org.kew.rmf.transformers.authors.ShrunkAuthors;

    }

    @Test
    public void need_to_deal_with_diacrits() {
        ShrunkAuthors transformer = new ShrunkAuthors();
        transformer.setShrinkTo(4);
        String author = "H.Baumann & Künkele";
        assertEquals("baum kunk", transformer.transform(author));
    }

    // TODO: make work (if it really makes sense..);
//    @Test
//    public void need_to_recognise_that_this_is_only_a_single_author_no_ampisand_or_comma1() {
//        ShrunkAuthors transformer = new ShrunkAuthors();
//        transformer.setShrinkTo(4);
//        String author = "Soto Arenas";
//        assertEquals("soto", transformer.transform(author));
//    }

    @Test
    public void ex_author_and_short_author() {
        ShrunkAuthors transformer = new ShrunkAuthors();
        transformer.setShrinkTo(3);
        String author = "L. ex Somebody";
        assertEquals("l som", transformer.transform(author));
    }

    @Test
    public void ex_and_in() {
        ShrunkAuthors transformer = new ShrunkAuthors();
        transformer.setShrinkTo(3);