@Test
public void testMediaURIWhenPathDoesNotEndInSlash() {

	String pathModule = StringPool.SLASH + RandomTestUtil.randomString();
	Mockito.when(
		_portal.getPathModule()
	).thenReturn(
		pathModule
	);
	URI relativeURI = URI.create(RandomTestUtil.randomString());
	String uriString = String.valueOf(
		_amURIResolver.resolveURI(relativeURI));
	Assert.assertTrue(uriString, uriString.contains(pathModule));
	Assert.assertTrue(
		uriString, uriString.contains(AMWebConstants.SERVLET_PATH));
	Assert.assertTrue(
		uriString, uriString.contains(relativeURI.toString()));
}