//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test void includeCauseOfFailure() throws org.neo4j.internal.kernel.api.exceptions.schema.IndexNotFoundKernelException //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: internal virtual void IncludeCauseOfFailure() { // given IndexDefinitionImpl indexDefinition = MockIndexDefinition(); when(indexDefinition.ToString()).thenReturn("IndexDefinition( of-some-sort )"); KernelTransaction kernelTransaction = MockKernelTransaction(); SchemaImpl schema = new SchemaImpl(() => kernelTransaction); // when System.InvalidOperationException e = assertThrows(typeof(System.InvalidOperationException), () => Schema.awaitIndexOnline(indexDefinition, 1, TimeUnit.MINUTES)); // then assertThat(e.Message, Matchers.containsString(indexDefinition.ToString())); assertThat(e.Message, Matchers.containsString(Exceptions.stringify(_cause))); }