// Path: src/main/java/org/esa/s3tbx/c2rcc/meris/C2rccMerisOperator.java
// static final String[] alternativeNetDirNames = new String[]{
//         "rtosa_aann",
//         "rtosa_rw",
//         "rw_iop",
//         "iop_rw",
//         "rw_kd",
//         "iop_unciop",
//         "iop_uncsumiop_unckd",
//         "rw_rwnorm",
//         "rtosa_trans",
//         "rtosa_rpath"
// };
// 
// Path: src/main/java/org/esa/s3tbx/c2rcc/util/NNUtils.java
// public class NNUtils {
//     public static String[] getNNFilePaths(Path nnRootPath, String[] alternativeNetDirNames) throws IOException {
//         final ArrayList<String> pathsList = new ArrayList<>();
//         final String prefix = "The path '" + nnRootPath.toString() + "' ";
// 
//         if (!Files.isDirectory(nnRootPath)) {
//             throw new OperatorException(prefix + "for alternative neuronal nets is not a valid path");
//         }
// 
//         final HashSet<String> dirNames = new HashSet<>();
//         Files.newDirectoryStream(nnRootPath).forEach(path -> {
//             if (Files.isDirectory(path)) {
//                 dirNames.add(path.getFileName().toString());
//             }
//         });
//         for (String alternativeNetDirName : alternativeNetDirNames) {
//             if (!dirNames.contains(alternativeNetDirName)) {
//                 throw new OperatorException(prefix + "does not contain the expected sub directory '" + alternativeNetDirName + "'");
//             }
//             final int[] dotNetFilesCount = {0};
//             final Path nnDirPath = nnRootPath.resolve(alternativeNetDirName);
//             Files.newDirectoryStream(nnDirPath).forEach(path -> {
//                 if (path.getFileName().toString().toLowerCase().endsWith(".net")
//                         && Files.isRegularFile(path)) {
//                     dotNetFilesCount[0]++;
//                     pathsList.add(path.toString());
//                 }
//             });
//             int count = dotNetFilesCount[0];
//             if (count != 1) {
//                 throw new OperatorException("The path '" + nnDirPath + " must contain exact 1 file with file ending '*.net', but contains " + count);
//             }
//         }
// 
//         return pathsList.toArray(new String[pathsList.size()]);
//     }
// }


import static org.esa.s3tbx.c2rcc.meris.C2rccMerisOperator.alternativeNetDirNames;
import static org.junit.Assert.*;
import com.google.common.jimfs.Jimfs;
import org.esa.s3tbx.c2rcc.util.NNUtils;
import org.junit.*;
import java.nio.file.FileSystem;
import java.nio.file.Files;
import java.nio.file.Path;
package org.esa.s3tbx.c2rcc.meris;




public class C2rccMerisOperator_getNNFilesPathsTest {

    private Path testDir;
    private FileSystem fileSystem;
    private String sep;

    @Before
    public void setUp() throws Exception {
// Path: src/main/java/org/esa/s3tbx/c2rcc/meris/C2rccMerisOperator.java
// static final String[] alternativeNetDirNames = new String[]{
//         "rtosa_aann",
//         "rtosa_rw",
//         "rw_iop",
//         "iop_rw",
//         "rw_kd",
//         "iop_unciop",
//         "iop_uncsumiop_unckd",
//         "rw_rwnorm",
//         "rtosa_trans",
//         "rtosa_rpath"
// };
// 
// Path: src/main/java/org/esa/s3tbx/c2rcc/util/NNUtils.java
// public class NNUtils {
//     public static String[] getNNFilePaths(Path nnRootPath, String[] alternativeNetDirNames) throws IOException {
//         final ArrayList<String> pathsList = new ArrayList<>();
//         final String prefix = "The path '" + nnRootPath.toString() + "' ";
// 
//         if (!Files.isDirectory(nnRootPath)) {
//             throw new OperatorException(prefix + "for alternative neuronal nets is not a valid path");
//         }
// 
//         final HashSet<String> dirNames = new HashSet<>();
//         Files.newDirectoryStream(nnRootPath).forEach(path -> {
//             if (Files.isDirectory(path)) {
//                 dirNames.add(path.getFileName().toString());
//             }
//         });
//         for (String alternativeNetDirName : alternativeNetDirNames) {
//             if (!dirNames.contains(alternativeNetDirName)) {
//                 throw new OperatorException(prefix + "does not contain the expected sub directory '" + alternativeNetDirName + "'");
//             }
//             final int[] dotNetFilesCount = {0};
//             final Path nnDirPath = nnRootPath.resolve(alternativeNetDirName);
//             Files.newDirectoryStream(nnDirPath).forEach(path -> {
//                 if (path.getFileName().toString().toLowerCase().endsWith(".net")
//                         && Files.isRegularFile(path)) {
//                     dotNetFilesCount[0]++;
//                     pathsList.add(path.toString());
//                 }
//             });
//             int count = dotNetFilesCount[0];
//             if (count != 1) {
//                 throw new OperatorException("The path '" + nnDirPath + " must contain exact 1 file with file ending '*.net', but contains " + count);
//             }
//         }
// 
//         return pathsList.toArray(new String[pathsList.size()]);
//     }
// }


// Path: src/test/java/org/esa/s3tbx/c2rcc/meris/C2rccMerisOperator_getNNFilesPathsTest.java
import static org.esa.s3tbx.c2rcc.meris.C2rccMerisOperator.alternativeNetDirNames;
import static org.junit.Assert.*;
import com.google.common.jimfs.Jimfs;
import org.esa.s3tbx.c2rcc.util.NNUtils;
import org.junit.*;
import java.nio.file.FileSystem;
import java.nio.file.Files;
import java.nio.file.Path;

package org.esa.s3tbx.c2rcc.meris;




public class C2rccMerisOperator_getNNFilesPathsTest {

    private Path testDir;
    private FileSystem fileSystem;
    private String sep;

    @Before
    public void setUp() throws Exception {
        fileSystem = Jimfs.newFileSystem();