_builder.append("}");
_builder.newLine();
final TargetPlatform targetPlatform = this.parser.parse(_builder);
final ResolvedTargetPlatform resolvedTargetPlatform = ResolvedTargetPlatform.create(targetPlatform, this.indexBuilder);
NullProgressMonitor _nullProgressMonitor = new NullProgressMonitor();
final Diagnostic d = resolvedTargetPlatform.resolve(new MockMetadataRepositoryManager(null) {
public IMetadataRepository loadRepository(final URI location, final IProgressMonitor monitor) throws ProvisionException, OperationCanceledException {
IMetadataRepository _xifexpression = null;
String _string = location.toString();
boolean _equals = "unknownHost".equals(_string);
if (_equals) {
throw new ProvisionException("Unknown Host");
} else {
_xifexpression = super.loadRepository(location, monitor);
}
return _xifexpression;
}
}, _nullProgressMonitor);
int _severity = d.getSeverity();
Assert.assertEquals(Diagnostic.ERROR, _severity);
List<Diagnostic> _children = d.getChildren();
Diagnostic _head = IterableExtensions.<Diagnostic>head(_children);
String _message = _head.getMessage();
String _plus = ("Message is " + _message);
List<Diagnostic> _children_1 = d.getChildren();
Diagnostic _head_1 = IterableExtensions.<Diagnostic>head(_children_1);
String _message_1 = _head_1.getMessage();
boolean _startsWith = _message_1.startsWith("Unknown Host");
Assert.assertTrue(_plus, _startsWith);
} catch (Throwable _e) {
throw Exceptions.sneakyThrow(_e);
}