### Question:
TrustDomain { public SpiffeId newSpiffeId(final String... segments) { return SpiffeId.of(this, segments); } private  TrustDomain(final String trustDomain); static TrustDomain of(@NonNull final String trustDomain); SpiffeId newSpiffeId(final String... segments); @Override String toString();  }### Answer:
@Test void testNewSpiffeId() { TrustDomain trustDomain = TrustDomain.of("test.domain"); SpiffeId spiffeId = trustDomain.newSpiffeId("path1", "host"); assertEquals(trustDomain, spiffeId.getTrustDomain()); assertEquals("/path1/host", spiffeId.getPath()); }