List of usage examples for java.nio.file Path getClass
@HotSpotIntrinsicCandidate public final native Class<?> getClass();
From source file:org.xwiki.vfs.internal.script.PathConverterTest.java
@Test public void convertWhenOk() throws Exception { ResourceReferenceSerializer<VfsResourceReference, URI> serializer = this.mocker .getInstance(new DefaultParameterizedType(null, ResourceReferenceSerializer.class, VfsResourceReference.class, URI.class), "truevfs"); VfsResourceReference reference = new VfsResourceReference(URI.create("attach:Sandbox.WebHome@my.zip"), "a/b/c"); when(serializer.serialize(reference)).thenReturn(URI.create("attach://xwiki:Sandbox.WebHome/my.zip/a/b/c")); Path path = this.mocker.getComponentUnderTest().convert(new DefaultParameterizedType(null, Path.class), "attach:Sandbox.WebHome@my.zip/a/b/c"); assertEquals("attach://xwiki:Sandbox.WebHome/my.zip/a/b/c", path.toString()); assertEquals(TPath.class.getName(), path.getClass().getName()); }