@Test
public void shouldProvideInfoFromPetstoreSwagger() throws IOException {
final String specification = resource("/swagger/petstore.swagger.json");
final ConnectorSettings connectorSettings = new ConnectorSettings.Builder()
.putConfiguredProperty("specification", specification)
.build();
final ConnectorSummary summary = generator.info(SWAGGER_TEMPLATE, connectorSettings);
final ActionsSummary actionsSummary = new ActionsSummary.Builder().totalActions(20).putActionCountByTag("store", 4)
.putActionCountByTag("user", 8).putActionCountByTag("pet", 8).build();
final ConnectorSummary expected = new ConnectorSummary.Builder()
.name("Swagger Petstore")
.actionsSummary(actionsSummary)
.build();
assertThat(summary).isEqualToIgnoringGivenFields(expected, "icon", "description", "properties", "warnings");
assertThat(summary.getIcon()).startsWith("data:image");
assertThat(summary.getDescription()).startsWith("This is a sample server Petstore server");
assertThat(summary.getProperties().keySet()).contains("host", "basePath", "authenticationType", "clientId", "clientSecret",
"accessToken", "authorizationEndpoint", "specification");
}