### Question:
ActorProxyBuilder { public T build(ActorId actorId) { if (actorId == null) { throw new IllegalArgumentException("Cannot instantiate an Actor without Id."); } ActorProxyImpl proxy = new ActorProxyImpl( this.actorType, actorId, this.objectSerializer, new DaprHttpClient(this.daprHttpBuilder.build())); if (this.clazz.equals(ActorProxy.class)) { return (T) proxy; } return (T) Proxy.newProxyInstance( ActorProxyImpl.class.getClassLoader(), new Class[]{this.clazz}, proxy); } ActorProxyBuilder(Class<T> actorTypeClass);  ActorProxyBuilder(String actorType, Class<T> actorTypeClass); ActorProxyBuilder withObjectSerializer(DaprObjectSerializer objectSerializer); T build(ActorId actorId);  }### Answer:
@Test(expected = IllegalArgumentException.class) public void buildWithNullActorId() { new ActorProxyBuilder("test", Object.class) .build(null); }
@Test(expected = IllegalArgumentException.class) public void buildWithEmptyActorType() { new ActorProxyBuilder("", Object.class) .build(new ActorId("100")); }
@Test(expected = IllegalArgumentException.class) public void buildWithNullActorType() { new ActorProxyBuilder(null, Object.class) .build(new ActorId("100")); }
@Test() public void build() { ActorProxyBuilder<ActorProxy> builder = new ActorProxyBuilder("test", ActorProxy.class); ActorProxy actorProxy = builder.build(new ActorId("100")); Assert.assertNotNull(actorProxy); Assert.assertEquals("test", actorProxy.getActorType()); Assert.assertEquals("100", actorProxy.getActorId().toString()); }
@Test() public void buildWithType() { ActorProxyBuilder<MyActor> builder = new ActorProxyBuilder(MyActor.class); MyActor actorProxy = builder.build(new ActorId("100")); Assert.assertNotNull(actorProxy); }
@Test() public void buildWithTypeDefaultName() { ActorProxyBuilder<MyActorWithDefaultName> builder = new ActorProxyBuilder(MyActorWithDefaultName.class); MyActorWithDefaultName actorProxy = builder.build(new ActorId("100")); Assert.assertNotNull(actorProxy); }