@Test @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class) public void sortedFileWithSuffixShouldBeCreatedIfNotSpecified() throws Exception { File toBeSorted = context.getResource("classpath:templates/" + UNSORTED_BED_NAME).getFile(); File copiedToBeSorted = new File(getTempDirectory(), UNSORTED_BED_NAME); Files.copy(toBeSorted.toPath(), copiedToBeSorted.toPath()); FeatureFileSortRequest request = new FeatureFileSortRequest(); request.setOriginalFilePath(copiedToBeSorted.getAbsolutePath()); assertSortRequest(request, new Find(".*" + EXPECTED_SORTED_SUFFIX_BED_NAME + "$")); }
/** * String argument that contains a substring that matches the given regular * expression. * * @param regex * the regular expression. * @return <code>null</code>. */ public static String find(String regex) { return reportMatcher(new Find(regex)).<String>returnNull(); }