package org.openecomp.core.model.types;
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.mockito.BDDMockito.given;
+import static org.mockito.Mockito.mock;
+
+import java.io.IOException;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.openecomp.sdc.common.errors.SdcRuntimeException;
import org.openecomp.sdc.versioning.dao.types.Version;
-import java.io.IOException;
-
-import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSettersExcluding;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.Mockito.mock;
-
public class EnrichedServiceArtifactEntityTest {
- private static final byte[] BYTE_ARRAY = new byte[] {0xA, 0xB, 0xC, 0xD};
+ private static final byte[] BYTE_ARRAY = new byte[]{0xA, 0xB, 0xC, 0xD};
- @Test
- public void shouldHaveValidGettersAndSetters() {
- assertThat(EnrichedServiceArtifactEntity.class,
- hasValidGettersAndSettersExcluding("entityType", "firstClassCitizenId", "serviceArtifact"));
+ private static ServiceArtifact createServiceArtifact() {
+ ServiceArtifact serviceArtifact = new ServiceArtifact();
+ serviceArtifact.setVspId("someIdd");
+ serviceArtifact.setVersion(new Version("best"));
+ serviceArtifact.setName("name");
+ serviceArtifact.setContentData(BYTE_ARRAY);
+ return serviceArtifact;
}
@Test
public void shouldReturnNonEmptyEntityType() {
EnrichedServiceArtifactEntity entity =
- new EnrichedServiceArtifactEntity();
+ new EnrichedServiceArtifactEntity();
assertTrue(StringUtils.isNoneEmpty(entity.getEntityType()));
}
@Test
public void shouldHaveFirstClassCitizenIdEqualToVspId() {
EnrichedServiceArtifactEntity entity =
- new EnrichedServiceArtifactEntity(createServiceArtifact());
+ new EnrichedServiceArtifactEntity(createServiceArtifact());
assertEquals(entity.getId(), entity.getFirstClassCitizenId());
}
public void serviceArtifactGetterShouldReturnCorrectData() throws IOException {
ServiceArtifact serviceArtifact = createServiceArtifact();
EnrichedServiceArtifactEntity entity =
- new EnrichedServiceArtifactEntity(serviceArtifact);
+ new EnrichedServiceArtifactEntity(serviceArtifact);
ServiceArtifact actual = entity.getServiceArtifact();
assertArrayEquals(IOUtils.toByteArray(serviceArtifact.getContent()), IOUtils.toByteArray(actual.getContent()));
}
- @Test(expected = SdcRuntimeException.class)
+ @Test
public void shouldFailOnNullContentBytesSupplied() {
ServiceArtifact serviceArtifactMock = mock(ServiceArtifact.class);
- given(serviceArtifactMock.getContent()).willAnswer(invocation -> { throw new IOException("Test exception"); } );
- EnrichedServiceArtifactEntity entity =
- new EnrichedServiceArtifactEntity(serviceArtifactMock);
- }
-
- private static ServiceArtifact createServiceArtifact() {
- ServiceArtifact serviceArtifact = new ServiceArtifact();
- serviceArtifact.setVspId("someIdd");
- serviceArtifact.setVersion(new Version("best"));
- serviceArtifact.setName("name");
- serviceArtifact.setContentData(BYTE_ARRAY);
- return serviceArtifact;
+ given(serviceArtifactMock.getContent()).willAnswer(invocation -> {
+ throw new IOException("Test exception");
+ });
+ assertThrows(SdcRuntimeException.class, () -> {
+ new EnrichedServiceArtifactEntity(serviceArtifactMock);
+ });
}
}
package org.openecomp.core.model.types;
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.mockito.BDDMockito.given;
+import static org.mockito.Mockito.mock;
+
+import java.io.IOException;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.openecomp.sdc.common.errors.SdcRuntimeException;
import org.openecomp.sdc.versioning.dao.types.Version;
-import java.io.IOException;
-
-import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSettersExcluding;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.Mockito.mock;
-
public class EnrichedServiceTemplateEntityTest {
- private static final byte[] BYTE_ARRAY = new byte[] {0xA, 0xB, 0xC, 0xD};
+ private static final byte[] BYTE_ARRAY = new byte[]{0xA, 0xB, 0xC, 0xD};
- @Test
- public void shouldHaveValidGettersAndSetters() {
- assertThat(EnrichedServiceTemplateEntity.class,
- hasValidGettersAndSettersExcluding("entityType", "firstClassCitizenId", "serviceTemplate"));
+ private static ServiceTemplate createServiceTemplate() {
+ ServiceTemplate serviceTemplate = new ServiceTemplate();
+ serviceTemplate.setVspId("someIdd");
+ serviceTemplate.setVersion(new Version("best"));
+ serviceTemplate.setName("name");
+ serviceTemplate.setContentData(BYTE_ARRAY);
+ return serviceTemplate;
}
@Test
public void shouldReturnNonEmptyEntityType() {
EnrichedServiceTemplateEntity entity =
- new EnrichedServiceTemplateEntity();
+ new EnrichedServiceTemplateEntity();
assertTrue(StringUtils.isNoneEmpty(entity.getEntityType()));
}
@Test
public void shouldHaveFirstClassCitizenIdEqualToVspId() {
EnrichedServiceTemplateEntity entity =
- new EnrichedServiceTemplateEntity(createServiceTemplate());
+ new EnrichedServiceTemplateEntity(createServiceTemplate());
assertEquals(entity.getId(), entity.getFirstClassCitizenId());
}
public void serviceTemplateGetterShouldReturnCorrectData() throws IOException {
ServiceTemplate serviceTemplate = createServiceTemplate();
EnrichedServiceTemplateEntity entity =
- new EnrichedServiceTemplateEntity(serviceTemplate);
+ new EnrichedServiceTemplateEntity(serviceTemplate);
ServiceTemplate actual = entity.getServiceTemplate();
assertArrayEquals(IOUtils.toByteArray(serviceTemplate.getContent()), IOUtils.toByteArray(actual.getContent()));
}
- @Test(expected = SdcRuntimeException.class)
+ @Test
public void shouldFailOnNullContentBytesSupplied() {
ServiceTemplate serviceTemplateMock = mock(ServiceTemplate.class);
- given(serviceTemplateMock.getContent()).willAnswer(invocation -> { throw new IOException("Test exception"); } );
- EnrichedServiceTemplateEntity entity =
- new EnrichedServiceTemplateEntity(serviceTemplateMock);
- }
-
- private static ServiceTemplate createServiceTemplate() {
- ServiceTemplate serviceTemplate = new ServiceTemplate();
- serviceTemplate.setVspId("someIdd");
- serviceTemplate.setVersion(new Version("best"));
- serviceTemplate.setName("name");
- serviceTemplate.setContentData(BYTE_ARRAY);
- return serviceTemplate;
+ given(serviceTemplateMock.getContent()).willAnswer(invocation -> {
+ throw new IOException("Test exception");
+ });
+ assertThrows(SdcRuntimeException.class, () -> {
+ new EnrichedServiceTemplateEntity(serviceTemplateMock);
+ });
}
}
package org.openecomp.core.model.types;
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.mockito.BDDMockito.given;
+import static org.mockito.Mockito.mock;
+
+import java.io.IOException;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.openecomp.sdc.common.errors.SdcRuntimeException;
import org.openecomp.sdc.versioning.dao.types.Version;
-import java.io.IOException;
-
-import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSettersExcluding;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.Mockito.mock;
-
public class ServiceArtifactEntityTest {
- private static final byte[] BYTE_ARRAY = new byte[] {0xA, 0xB, 0xC, 0xD};
+ private static final byte[] BYTE_ARRAY = new byte[]{0xA, 0xB, 0xC, 0xD};
- @Test
- public void shouldHaveValidGettersAndSetters() {
- assertThat(ServiceArtifactEntity.class,
- hasValidGettersAndSettersExcluding("entityType", "firstClassCitizenId", "serviceArtifact"));
+ private static ServiceArtifact createServiceArtifact() {
+ ServiceArtifact serviceArtifact = new ServiceArtifact();
+ serviceArtifact.setVspId("someIdd");
+ serviceArtifact.setVersion(new Version("best"));
+ serviceArtifact.setName("name");
+ serviceArtifact.setContentData(BYTE_ARRAY);
+ return serviceArtifact;
}
@Test
public void shouldReturnNonEmptyEntityType() {
ServiceArtifactEntity entity =
- new ServiceArtifactEntity();
+ new ServiceArtifactEntity();
assertTrue(StringUtils.isNoneEmpty(entity.getEntityType()));
}
@Test
public void shouldHaveFirstClassCitizenIdEqualToVspId() {
ServiceArtifactEntity entity =
- new ServiceArtifactEntity(createServiceArtifact());
+ new ServiceArtifactEntity(createServiceArtifact());
assertEquals(entity.getId(), entity.getFirstClassCitizenId());
}
public void serviceArtifactGetterShouldReturnCorrectData() throws IOException {
ServiceArtifact serviceArtifact = createServiceArtifact();
ServiceArtifactEntity entity =
- new ServiceArtifactEntity(serviceArtifact);
+ new ServiceArtifactEntity(serviceArtifact);
ServiceArtifact actual = entity.getServiceArtifact();
assertArrayEquals(IOUtils.toByteArray(serviceArtifact.getContent()), IOUtils.toByteArray(actual.getContent()));
}
- @Test(expected = SdcRuntimeException.class)
+ @Test
public void shouldFailOnNullContentBytesSupplied() {
ServiceArtifact serviceArtifactMock = mock(ServiceArtifact.class);
- given(serviceArtifactMock.getContent()).willAnswer(invocation -> { throw new IOException("Test exception"); } );
- ServiceArtifactEntity entity =
- new ServiceArtifactEntity(serviceArtifactMock);
- }
-
- private static ServiceArtifact createServiceArtifact() {
- ServiceArtifact serviceArtifact = new ServiceArtifact();
- serviceArtifact.setVspId("someIdd");
- serviceArtifact.setVersion(new Version("best"));
- serviceArtifact.setName("name");
- serviceArtifact.setContentData(BYTE_ARRAY);
- return serviceArtifact;
+ given(serviceArtifactMock.getContent()).willAnswer(invocation -> {
+ throw new IOException("Test exception");
+ });
+ assertThrows(SdcRuntimeException.class, () -> {
+ new ServiceArtifactEntity(serviceArtifactMock);
+ });
}
}
package org.openecomp.core.model.types;
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.mockito.BDDMockito.given;
+import static org.mockito.Mockito.mock;
+
+import java.io.IOException;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.openecomp.sdc.common.errors.SdcRuntimeException;
import org.openecomp.sdc.versioning.dao.types.Version;
-import java.io.IOException;
-
-import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSettersExcluding;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.Mockito.mock;
-
public class ServiceTemplateEntityTest {
- private static final byte[] BYTE_ARRAY = new byte[] {0xA, 0xB, 0xC, 0xD};
+ private static final byte[] BYTE_ARRAY = new byte[]{0xA, 0xB, 0xC, 0xD};
- @Test
- public void shouldHaveValidGettersAndSetters() {
- assertThat(ServiceTemplateEntity.class,
- hasValidGettersAndSettersExcluding("entityType", "firstClassCitizenId", "serviceTemplate"));
+ private static ServiceTemplate createServiceTemplate() {
+ ServiceTemplate serviceTemplate = new ServiceTemplate();
+ serviceTemplate.setVspId("someIdd");
+ serviceTemplate.setVersion(new Version("best"));
+ serviceTemplate.setName("name");
+ serviceTemplate.setContentData(BYTE_ARRAY);
+ return serviceTemplate;
}
@Test
public void shouldReturnNonEmptyEntityType() {
ServiceTemplateEntity entity =
- new ServiceTemplateEntity();
+ new ServiceTemplateEntity();
assertTrue(StringUtils.isNoneEmpty(entity.getEntityType()));
}
@Test
public void shouldHaveFirstClassCitizenIdEqualToVspId() {
ServiceTemplateEntity entity =
- new ServiceTemplateEntity(createServiceTemplate());
+ new ServiceTemplateEntity(createServiceTemplate());
assertEquals(entity.getId(), entity.getFirstClassCitizenId());
}
public void serviceTemplateGetterShouldReturnCorrectData() throws IOException {
ServiceTemplate serviceTemplate = createServiceTemplate();
ServiceTemplateEntity entity =
- new ServiceTemplateEntity(serviceTemplate);
+ new ServiceTemplateEntity(serviceTemplate);
ServiceTemplate actual = entity.getServiceTemplate();
assertArrayEquals(IOUtils.toByteArray(serviceTemplate.getContent()), IOUtils.toByteArray(actual.getContent()));
}
- @Test(expected = SdcRuntimeException.class)
+ @Test
public void shouldFailOnNullContentBytesSupplied() {
ServiceTemplate serviceTemplateMock = mock(ServiceTemplate.class);
- given(serviceTemplateMock.getContent()).willAnswer(invocation -> { throw new IOException("Test exception"); } );
- ServiceTemplateEntity entity =
- new ServiceTemplateEntity(serviceTemplateMock);
- }
-
- private static ServiceTemplate createServiceTemplate() {
- ServiceTemplate serviceTemplate = new ServiceTemplate();
- serviceTemplate.setVspId("someIdd");
- serviceTemplate.setVersion(new Version("best"));
- serviceTemplate.setName("name");
- serviceTemplate.setContentData(BYTE_ARRAY);
- return serviceTemplate;
+ given(serviceTemplateMock.getContent()).willAnswer(invocation -> {
+ throw new IOException("Test exception");
+ });
+ assertThrows(SdcRuntimeException.class, () -> {
+ new ServiceTemplateEntity(serviceTemplateMock);
+ });
}
}
import com.google.common.io.ByteStreams;
import java.io.IOException;
import java.nio.ByteBuffer;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
import org.openecomp.sdc.common.errors.SdcRuntimeException;
import org.openecomp.sdc.versioning.dao.types.Version;
+@Getter
+@Setter
+@NoArgsConstructor
@Table(keyspace = "dox", name = "vsp_enriched_service_artifact")
public class EnrichedServiceArtifactEntity implements ServiceElementEntity {
- private static final String ENTITY_TYPE;
-
- static {
- ENTITY_TYPE = "Vendor Software Product Service artifact";
- }
+ private static final String ENTITY_TYPE = "Vendor Software Product Service artifact";
@PartitionKey
@Column(name = "vsp_id")
@Column(name = "content_data")
public ByteBuffer contentData;
- /**
- * Every entity class must have a default constructor according to
- * <a href="http://docs.datastax.com/en/developer/java-driver/2.1/manual/object_mapper/creating/">
- * Definition of mapped classes</a>.
- */
- public EnrichedServiceArtifactEntity() {
- // Don't delete! Default constructor is required by DataStax driver
- }
-
/**
* Instantiates a new Enriched service artifact entity.
*
return getId();
}
- @Override
- public String getId() {
- return id;
- }
-
- @Override
- public void setId(String id) {
- this.id = id;
- }
-
- @Override
- public Version getVersion() {
- return version;
- }
-
- @Override
- public void setVersion(Version version) {
- this.version = version;
- }
-
- @Override
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- @Override
- public ByteBuffer getContentData() {
- return contentData;
- }
-
- public void setContentData(ByteBuffer contentData) {
- this.contentData = contentData;
- }
-
public ServiceArtifact getServiceArtifact() {
ServiceArtifact serviceArtifact = new ServiceArtifact();
serviceArtifact.setName(this.getName());
import com.google.common.io.ByteStreams;
import java.io.IOException;
import java.nio.ByteBuffer;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
import org.openecomp.sdc.common.errors.SdcRuntimeException;
import org.openecomp.sdc.versioning.dao.types.Version;
+@Getter
+@Setter
+@NoArgsConstructor
@Table(keyspace = "dox", name = "vsp_enriched_service_template")
public class EnrichedServiceTemplateEntity implements ServiceElementEntity {
- private static final String ENTITY_TYPE;
-
- static {
- ENTITY_TYPE = "Vendor Software Product Service model";
- }
+ private static final String ENTITY_TYPE = "Vendor Software Product Service model";
@PartitionKey
@Column(name = "vsp_id")
@Column(name = "base_name")
private String baseName;
- /**
- * Every entity class must have a default constructor according to
- * <a href="http://docs.datastax.com/en/developer/java-driver/2.1/manual/object_mapper/creating/">
- * Definition of mapped classes</a>.
- */
- public EnrichedServiceTemplateEntity() {
- // Don't delete! Default constructor is required by DataStax driver
- }
-
/**
* Instantiates a new Enriched service template entity.
*
}
}
- public String getBaseName() {
- return baseName;
- }
-
- public void setBaseName(String baseName) {
- this.baseName = baseName;
- }
-
@Override
public String getEntityType() {
return ENTITY_TYPE;
return getId();
}
- @Override
- public String getId() {
- return id;
- }
-
- @Override
- public void setId(String id) {
- this.id = id;
- }
-
- @Override
- public Version getVersion() {
- return version;
- }
-
- @Override
- public void setVersion(Version version) {
- this.version = version;
- }
-
- @Override
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- @Override
- public ByteBuffer getContentData() {
- return contentData;
- }
-
- public void setContentData(ByteBuffer contentData) {
- this.contentData = contentData;
- }
-
public ServiceTemplate getServiceTemplate() {
ServiceTemplate serviceTemplate = new ServiceTemplate();
serviceTemplate.setName(getName());
import com.google.common.io.ByteStreams;
import java.io.IOException;
import java.nio.ByteBuffer;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
import org.openecomp.sdc.common.errors.SdcRuntimeException;
import org.openecomp.sdc.versioning.dao.types.Version;
+@Getter
+@Setter
+@NoArgsConstructor
@Table(keyspace = "dox", name = "vsp_service_artifact")
public class ServiceArtifactEntity implements ServiceElementEntity {
- private static final String ENTITY_TYPE;
-
- static {
- ENTITY_TYPE = "Vendor Software Product Service artifact";
- }
+ private static final String ENTITY_TYPE = "Vendor Software Product Service artifact";
@PartitionKey
@Column(name = "vsp_id")
@Column(name = "content_data")
public ByteBuffer contentData;
- /**
- * Every entity class must have a default constructor according to
- * <a href="http://docs.datastax.com/en/developer/java-driver/2.1/manual/object_mapper/creating/">
- * Definition of mapped classes</a>.
- */
- public ServiceArtifactEntity() {
- // Don't delete! Default constructor is required by DataStax driver
- }
-
/**
* Instantiates a new Service artifact entity.
*
return getId();
}
- @Override
- public String getId() {
- return id;
- }
-
- @Override
- public void setId(String id) {
- this.id = id;
- }
-
- @Override
- public Version getVersion() {
- return version;
- }
-
- @Override
- public void setVersion(Version version) {
- this.version = version;
- }
-
- @Override
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- @Override
- public ByteBuffer getContentData() {
- return contentData;
- }
-
- public void setContentData(ByteBuffer contentData) {
- this.contentData = contentData;
- }
-
public ServiceArtifact getServiceArtifact() {
ServiceArtifact serviceArtifact = new ServiceArtifact();
serviceArtifact.setName(this.getName());
import com.google.common.io.ByteStreams;
import java.io.IOException;
import java.nio.ByteBuffer;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
import org.openecomp.sdc.common.errors.SdcRuntimeException;
import org.openecomp.sdc.versioning.dao.types.Version;
+@Getter
+@Setter
+@NoArgsConstructor
@Table(keyspace = "dox", name = "vsp_service_template")
public class ServiceTemplateEntity implements ServiceElementEntity {
- private static final String ENTITY_TYPE;
-
- static {
- ENTITY_TYPE = "Vendor Software Product Service model";
- }
+ private static final String ENTITY_TYPE = "Vendor Software Product Service model";
@PartitionKey
@Column(name = "vsp_id")
@Column(name = "base_name")
private String baseName;
- /**
- * Every entity class must have a default constructor according to
- * <a href="http://docs.datastax.com/en/developer/java-driver/2.1/manual/object_mapper/creating/">
- * Definition of mapped classes</a>.
- */
- public ServiceTemplateEntity() {
- // Don't delete! Default constructor is required by DataStax driver
- }
-
/**
* Instantiates a new Service template entity.
*
}
}
- public String getBaseName() {
- return baseName;
- }
-
- public void setBaseName(String baseName) {
- this.baseName = baseName;
- }
-
@Override
public String getEntityType() {
return ENTITY_TYPE;
return getId();
}
- @Override
- public String getId() {
- return id;
- }
-
- @Override
- public void setId(String id) {
- this.id = id;
- }
-
- @Override
- public Version getVersion() {
- return version;
- }
-
- @Override
- public void setVersion(Version version) {
- this.version = version;
- }
-
- @Override
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- @Override
- public ByteBuffer getContentData() {
- return contentData;
- }
-
- public void setContentData(ByteBuffer contentData) {
- this.contentData = contentData;
- }
-
public ServiceTemplate getServiceTemplate() {
ServiceTemplate serviceTemplate = new ServiceTemplate();
serviceTemplate.setName(getName());