@Test
public void createEndpoint_useCustomTemplate_allTemplatesUsed() {

    Service testService =
            Services.serviceBuilder()
                    .serviceEndpointPrefix("foobar")
                    .serviceName("EndpointBuilderTest3")
                    .serviceEndpointTemplate(
                            "http://{serviceEndpointPrefix}.{region}.{secondLevelDomain}")
                    .build();
    assertEquals(
            "http://foobar.us-phoenix-1.oraclecloud.com",
            EndpointBuilder.createEndpoint(testService, Region.US_PHOENIX_1));
}