class ServiceEntryExample {
  private static final String NAMESPACE = "test";

  public static void main(String[] args) {
    try {
      IstioClient client = ClientFactory.newClient(args);
      createResource(client);
      System.exit(0);
    } catch (KubernetesClientException ex) {
      System.err.println("Failed with " + ex.getMessage());
      System.exit(1);
    }
  }

  public static void createResource(IstioClient client) {<FILL_FUNCTION_BODY>}
}

    System.out.println("Creating a service entry");
    // Example from: https://istio.io/latest/docs/reference/config/networking/service-entry/
    client.v1beta1().serviceEntries().inNamespace(NAMESPACE).create(new ServiceEntryBuilder()
        .withNewMetadata()
        .withName("external-svc-https")
        .endMetadata()
        .withNewSpec()
        .withHosts("api.dropboxapi.com", "www.googleapis.com")
        .withLocation(ServiceEntryLocation.MESH_INTERNAL)
        .withPorts(new ServicePortBuilder().withName("https").withProtocol("TLS").withNumber(443).build())
        .endSpec()
        .build());

    System.out.println("Listing Virtual Service Instances:");
    ServiceEntryList list = client.v1beta1().serviceEntries().inNamespace(NAMESPACE).list();
    list.getItems().forEach(b -> System.out.println(b.getMetadata().getName()));
    System.out.println("Done");
  
<no_super_class>