/** * Test igfs path constructors. * * @throws Exception In case of any exception. */ @SuppressWarnings("TooBroadScope") @Test public void testConstructors() throws Exception { String pathStr = "///"; URI uri = URI.create(pathStr); IgfsPath path = new IgfsPath(uri); Class nullUri = URI.class; Class nullStr = String.class; Class nullPath = IgfsPath.class; expectConstructorThrows(NullPointerException.class, nullUri); expectConstructorThrows(IllegalArgumentException.class, nullStr); expectConstructorThrows(IllegalArgumentException.class, nullStr, nullStr, nullStr); expectConstructorThrows(NullPointerException.class, nullPath, nullStr); expectConstructorThrows(NullPointerException.class, nullPath, nullUri); String name = "with space in path.txt"; assertEquals(name, new IgfsPath(path, name).name()); }