@Test
public void testGetJSON() throws IOException {

	FrontendTokenDefinitionRegistryImpl
		frontendTokenDefinitionRegistryImpl =
			new FrontendTokenDefinitionRegistryImpl();
	frontendTokenDefinitionRegistryImpl.resourceBundleLoaders =
		Mockito.mock(ServiceTrackerMap.class);
	Bundle bundle = Mockito.mock(Bundle.class);
	Mockito.when(
		bundle.getEntry("WEB-INF/frontend-token-definition.json")
	).thenReturn(
		_frontendTokenDefinitionJSONURL
	);
	Mockito.when(
		bundle.getHeaders(Mockito.anyString())
	).thenReturn(
		new HashMapDictionary<>()
	);
	FrontendTokenDefinition frontendTokenDefinition =
		frontendTokenDefinitionRegistryImpl.getFrontendTokenDefinitionImpl(
			bundle);
	try (InputStream inputStream =
			_frontendTokenDefinitionJSONURL.openStream()) {
		Assert.assertEquals(
			StringUtil.read(inputStream),
			frontendTokenDefinition.getJSON(LocaleUtil.ENGLISH));
	}
}