### Question:
DirectoryFactory { public ServiceClient makeServiceClient(String serviceId) { if (serviceId == null) throw new IllegalArgumentException("Argument serviceId cannot be null."); UUID serviceUUID = UUID.fromString(serviceId); return new BasicServiceClient(serviceUUID, transport); } DirectoryFactory(Transport transport, UUID directoryId); DirectoryClient makeDirectoryClient(); ServiceClient makeServiceClient(String serviceId);  }### Answer:
@Test(expected = IllegalArgumentException.class) public void testMakeServiceClientWithNullThrowsIllegalArgument() throws Exception { directoryFactory.makeServiceClient(null); }
@Test(expected = IllegalArgumentException.class) public void testMakeServiceClientWithInvalidUUIDThrowsIllegalArgument() throws Exception { directoryFactory.makeServiceClient("Not A UUID"); }
@Test public void testMakeServiceClientWithValidUUIDReturnsClient() throws Exception { assertThat( directoryFactory.makeServiceClient("49af9c38-31b3-11e7-93ae-92361f002671"), instanceOf(ServiceClient.class)); }