// Path: ocpp-common/src/main/java/eu/chargetime/ocpp/model/TestRequest.java
// public class TestRequest implements Request {
//   @Override
//   public boolean validate() {
//     return true;
//   }
// 
//   @Override
//   public boolean transactionRelated() {
//     return false;
//   }
// }


import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import eu.chargetime.ocpp.FeatureRepository;
import eu.chargetime.ocpp.feature.Feature;
import eu.chargetime.ocpp.model.Confirmation;
import eu.chargetime.ocpp.model.Request;
import eu.chargetime.ocpp.model.TestConfirmation;
import eu.chargetime.ocpp.model.TestRequest;
import java.util.Optional;
import java.util.UUID;
import org.junit.Test;
package eu.chargetime.ocpp.test;



public class FeatureRepositoryTest {

  private final TestFeature feature = new TestFeature();
  private static final String ACTION_NAME = "TestFeature";

  @Test
  public void testFind() {
    FeatureRepository f = new FeatureRepository();
    f.addFeature(feature);

    assertFalse(f.findFeature("TestFeatureFail").isPresent());
    assertFalse(f.findFeature(3).isPresent());

    assertWhenFound(f.findFeature(ACTION_NAME));
// Path: ocpp-common/src/main/java/eu/chargetime/ocpp/model/TestRequest.java
// public class TestRequest implements Request {
//   @Override
//   public boolean validate() {
//     return true;
//   }
// 
//   @Override
//   public boolean transactionRelated() {
//     return false;
//   }
// }


// Path: ocpp-common/src/test/java/eu/chargetime/ocpp/test/FeatureRepositoryTest.java
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import eu.chargetime.ocpp.FeatureRepository;
import eu.chargetime.ocpp.feature.Feature;
import eu.chargetime.ocpp.model.Confirmation;
import eu.chargetime.ocpp.model.Request;
import eu.chargetime.ocpp.model.TestConfirmation;
import eu.chargetime.ocpp.model.TestRequest;
import java.util.Optional;
import java.util.UUID;
import org.junit.Test;

package eu.chargetime.ocpp.test;



public class FeatureRepositoryTest {

  private final TestFeature feature = new TestFeature();
  private static final String ACTION_NAME = "TestFeature";

  @Test
  public void testFind() {
    FeatureRepository f = new FeatureRepository();
    f.addFeature(feature);

    assertFalse(f.findFeature("TestFeatureFail").isPresent());
    assertFalse(f.findFeature(3).isPresent());

    assertWhenFound(f.findFeature(ACTION_NAME));
    assertWhenFound(f.findFeature(new TestRequest()));