### Question:
Address { public static String getDefaultAddress() { String address = System.getenv(Address.SOCKET_ENV_VARIABLE); if (StringUtils.isBlank(address)) { String error = String.format("Endpoint Socket Address Environment Variable is not set: %s", SOCKET_ENV_VARIABLE); throw new IllegalStateException(error); } return address; } private  Address(); static String getDefaultAddress(); static URI parseAddress(@NonNull final String address); static final String SOCKET_ENV_VARIABLE; }### Answer:
@Test void getDefaultAddress() throws Exception { TestUtils.setEnvironmentVariable(Address.SOCKET_ENV_VARIABLE, "unix:/tmp/test" ); String defaultAddress = Address.getDefaultAddress(); assertEquals("unix:/tmp/test", defaultAddress); }
@Test void getDefaultAddress_isBlankThrowsException() throws Exception { TestUtils.setEnvironmentVariable(Address.SOCKET_ENV_VARIABLE, ""); try { Address.getDefaultAddress(); fail(); } catch (Exception e) { assertEquals("Endpoint Socket Address Environment Variable is not set: SPIFFE_ENDPOINT_SOCKET", e.getMessage()); } }