void () { UniqueNameBuilder<String> builder = new UniqueNameBuilder<>("/Users/yole/idea", "/"); builder.addPath("A", "/Users/yole/idea/pycharm/download/index.html"); builder.addPath("B", "/Users/yole/idea/pycharm/documentation/index.html"); builder.addPath("C", "/Users/yole/idea/fabrique/download/index.html"); assertEquals("pycharm/download/index.html", builder.getShortPath("A")); assertEquals("pycharm/documentation/index.html", builder.getShortPath("B")); assertEquals("fabrique/download/index.html", builder.getShortPath("C")); }