package com.github.helpermethod.membrane.starter.dsl;

import com.predic8.membrane.core.rules.AbstractServiceProxy.Target;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;

import static org.assertj.core.api.Assertions.assertThat;

public class TargetSpecificationTests {
    private final Target target = new Target();

    @Test
    @DisplayName("Set the host")
    public void testSetHost() {
        TargetSpecification targetSpecification = new TargetSpecification(target);

        targetSpecification.host("localhost");

        assertThat(target.getHost()).isEqualTo("localhost");
    }

    @Test
    @DisplayName("Set the port")
    public void testSetPort() {
        TargetSpecification targetSpecification = new TargetSpecification(target);

        targetSpecification.port(8080);

        assertThat(target.getPort()).isEqualTo(8080);
    }
}

@@ -345,91 +345,25 @@
 ();%0A
-%0A
     
-@Test%0A    @DisplayName(%22Set the host%22)%0A    public void testSetHost() %7B%0A       
+private final
  Tar
@@ -427,32 +427,107 @@
 ation(target);%0A%0A
+    @Test%0A    @DisplayName(%22Set the host%22)%0A    public void testSetHost() %7B%0A
         targetSp
@@ -705,92 +705,8 @@
 ) %7B%0A
-        TargetSpecification targetSpecification = new TargetSpecification(target);%0A%0A
     
@@ -803,9 +803,8 @@
 %0A    %7D%0A%7D
-%0A

Refactor test