// Path: stecker-plugin-loader/src/main/java/org/meridor/stecker/PluginMetadata.java
// public interface PluginMetadata {
// 
//     /**
//      * Returns unique plugin name
//      *
//      * @return free-form string with name
//      */
//     String getName();
// 
//     /**
//      * Returns plugin version
//      *
//      * @return free-form string with version
//      */
//     String getVersion();
// 
//     /**
//      * Returns {@link Path} object corresponding to plugin file
//      *
//      * @return plugin {@link Path} object
//      */
//     Path getPath();
// 
//     /**
//      * Returns {@link org.meridor.stecker.interfaces.Dependency} object corresponding to this plugin
//      *
//      * @return dependency object
//      */
//     Dependency getDependency();
// 
//     /**
//      * Returns date when plugin was released
//      *
//      * @return local date or empty if not set
//      */
//     Optional<ZonedDateTime> getDate();
// 
//     /**
//      * Returns detailed plugin description
//      *
//      * @return description or empty if not set
//      */
//     Optional<String> getDescription();
// 
//     /**
//      * Returns maintainer email and name
//      *
//      * @return email and name in the format: <b>John Smith &lt;john.smith@example.com&gt;</b> or empty if not set
//      */
//     Optional<String> getMaintainer();
// 
//     /**
//      * Returns a list of plugins required to make this plugin work
//      *
//      * @return possibly empty list with dependencies
//      */
//     List<Dependency> getRequiredDependencies();
// 
//     /**
//      * Returns a list of plugins that should be never installed simultaneously with this plugin
//      *
//      * @return possibly empty list with conflicting dependencies
//      */
//     List<Dependency> getConflictingDependencies();
// 
//     /**
//      * Returns a meta dependency which is provided by this plugin
//      *
//      * @return meta dependency or empty if not set
//      */
//     Optional<Dependency> getProvidedDependency();
// 
// }
// 
// Path: stecker-plugin-loader/src/test/java/org/meridor/stecker/TemporaryDirectory.java
// public class TemporaryDirectory extends ExternalResource {
// 
//     private Path directory;
// 
//     @Override
//     protected void before() throws Throwable {
//         super.before();
//         create();
//     }
// 
//     private void create() throws IOException {
//         directory = FileSystemHelper.createTempDirectory();
//     }
// 
//     @Override
//     protected void after() {
//         super.after();
//         remove();
//     }
// 
//     private void remove() {
//         try {
//             FileSystemHelper.removeDirectory(directory);
//         } catch (IOException e) {
//             System.out.println("Can't remove temporary directory");
//             e.printStackTrace();
//         }
//     }
// 
//     public Path getDirectory() {
//         return directory;
//     }
// 
//     public Path createFile(String fileName, byte[] contents) throws IOException {
//         Path filePath = directory.resolve(fileName);
//         Files.write(filePath, contents);
//         return filePath;
//     }
// }


import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.meridor.stecker.PluginMetadata;
import org.meridor.stecker.TemporaryDirectory;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertThat;
package org.meridor.stecker.dev;




public class DevManifestReaderTest {

    @Rule
    public TemporaryDirectory temporaryDirectory = new TemporaryDirectory();

    private static final String DIRECTORY_NAME = "some-plugin";

    private Path pluginDirectory;

    @Before
    public void createDirectory() throws IOException {
        pluginDirectory = temporaryDirectory.getDirectory().resolve(DIRECTORY_NAME);
        Files.createDirectories(pluginDirectory);
    }

    @Test
    public void testRead() throws Exception {
        DevManifestReader devManifestReader = new DevManifestReader();
// Path: stecker-plugin-loader/src/main/java/org/meridor/stecker/PluginMetadata.java
// public interface PluginMetadata {
// 
//     /**
//      * Returns unique plugin name
//      *
//      * @return free-form string with name
//      */
//     String getName();
// 
//     /**
//      * Returns plugin version
//      *
//      * @return free-form string with version
//      */
//     String getVersion();
// 
//     /**
//      * Returns {@link Path} object corresponding to plugin file
//      *
//      * @return plugin {@link Path} object
//      */
//     Path getPath();
// 
//     /**
//      * Returns {@link org.meridor.stecker.interfaces.Dependency} object corresponding to this plugin
//      *
//      * @return dependency object
//      */
//     Dependency getDependency();
// 
//     /**
//      * Returns date when plugin was released
//      *
//      * @return local date or empty if not set
//      */
//     Optional<ZonedDateTime> getDate();
// 
//     /**
//      * Returns detailed plugin description
//      *
//      * @return description or empty if not set
//      */
//     Optional<String> getDescription();
// 
//     /**
//      * Returns maintainer email and name
//      *
//      * @return email and name in the format: <b>John Smith &lt;john.smith@example.com&gt;</b> or empty if not set
//      */
//     Optional<String> getMaintainer();
// 
//     /**
//      * Returns a list of plugins required to make this plugin work
//      *
//      * @return possibly empty list with dependencies
//      */
//     List<Dependency> getRequiredDependencies();
// 
//     /**
//      * Returns a list of plugins that should be never installed simultaneously with this plugin
//      *
//      * @return possibly empty list with conflicting dependencies
//      */
//     List<Dependency> getConflictingDependencies();
// 
//     /**
//      * Returns a meta dependency which is provided by this plugin
//      *
//      * @return meta dependency or empty if not set
//      */
//     Optional<Dependency> getProvidedDependency();
// 
// }
// 
// Path: stecker-plugin-loader/src/test/java/org/meridor/stecker/TemporaryDirectory.java
// public class TemporaryDirectory extends ExternalResource {
// 
//     private Path directory;
// 
//     @Override
//     protected void before() throws Throwable {
//         super.before();
//         create();
//     }
// 
//     private void create() throws IOException {
//         directory = FileSystemHelper.createTempDirectory();
//     }
// 
//     @Override
//     protected void after() {
//         super.after();
//         remove();
//     }
// 
//     private void remove() {
//         try {
//             FileSystemHelper.removeDirectory(directory);
//         } catch (IOException e) {
//             System.out.println("Can't remove temporary directory");
//             e.printStackTrace();
//         }
//     }
// 
//     public Path getDirectory() {
//         return directory;
//     }
// 
//     public Path createFile(String fileName, byte[] contents) throws IOException {
//         Path filePath = directory.resolve(fileName);
//         Files.write(filePath, contents);
//         return filePath;
//     }
// }


// Path: stecker-plugin-loader/src/test/java/org/meridor/stecker/dev/DevManifestReaderTest.java
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.meridor.stecker.PluginMetadata;
import org.meridor.stecker.TemporaryDirectory;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertThat;

package org.meridor.stecker.dev;




public class DevManifestReaderTest {

    @Rule
    public TemporaryDirectory temporaryDirectory = new TemporaryDirectory();

    private static final String DIRECTORY_NAME = "some-plugin";

    private Path pluginDirectory;

    @Before
    public void createDirectory() throws IOException {
        pluginDirectory = temporaryDirectory.getDirectory().resolve(DIRECTORY_NAME);
        Files.createDirectories(pluginDirectory);
    }

    @Test
    public void testRead() throws Exception {
        DevManifestReader devManifestReader = new DevManifestReader();
        PluginMetadata pluginMetadata = devManifestReader.read(pluginDirectory);