### Question:
AAISimpleUri extends
        SimpleUri<AAIResourceUri, AAIPluralResourceUri, AAIObjectType, AAIObjectPlurals, AAISingleFragment, AAIPluralFragment> implements AAIResourceUri { @Override public AAISimpleUri relatedTo(AAIObjectType type, String... values) { this.internalURI = internalURI.path(relatedTo); return new AAISimpleUri(this, type, values); } protected  AAISimpleUri(AAIObjectType type, Object... values); protected  AAISimpleUri(AAIObjectType type, URI uri); protected  AAISimpleUri(AAIObjectType type, UriBuilder builder, Object... values); protected  AAISimpleUri(AAIResourceUri parentUri, AAIObjectType childType, Object... childValues); protected  AAISimpleUri(AAISimpleUri copy); @Override AAISimpleUri clone(); @Override AAISimpleUri relatedTo(AAIObjectType type, String... values); @Override AAISimplePluralUri relatedTo(AAIObjectPlurals plural); @Override AAISimpleUri relatedTo(AAISingleFragment fragment); @Override AAISimplePluralUri relatedTo(AAIPluralFragment fragment);  }### Answer:
@Test public void relatedToTestPlural() { AAIPluralResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("test1")) .relatedTo(Types.PSERVERS.getFragment()); String uriOutput = uri.build().toString(); String expected = "/network/generic-vnfs/generic-vnf/test1/related-to/pservers"; assertEquals(expected, uriOutput); uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("test1")) .relatedTo(Types.PSERVERS.getFragment()); uriOutput = uri.build().toString(); assertEquals(expected, uriOutput); }
@Test public void relatedToTestSingular() { AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("test1")) .relatedTo(Types.PSERVER.getFragment("test2")); String uriOutput = uri.build().toString(); String expected = "/network/generic-vnfs/generic-vnf/test1/related-to/pservers/pserver/test2"; assertEquals(expected, uriOutput); uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf("test1")) .relatedTo(Types.PSERVER.getFragment("test2")); uriOutput = uri.build().toString(); assertEquals(expected, uriOutput); }