input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
whenContainsOneItemCanStepBack ( ) { uk . ac . imperial . pipe . models . petrinet . Transition transition = mock ( uk . ac . imperial . pipe . models . petrinet . Transition . class ) ; history . addHistoryItem ( transition ) ; "<AssertPlaceHolder>" ; } isStepBackAllowed ( ) { return ( currentPosition ) >= 0 ; }
org . junit . Assert . assertTrue ( history . isStepBackAllowed ( ) )
offerAndPollSameKey ( ) { com . vmware . xenon . common . RoundRobinOperationQueue q = new com . vmware . xenon . common . RoundRobinOperationQueue ( "test" , this . count ) ; try { q . offer ( null , com . vmware . xenon . common . Operation . createGet ( null ) ) ; org . junit . Assert . fail ( "null<sp>key<sp>offer<sp>should<sp>have<sp>failed" ) ; } catch ( java . lang . IllegalArgumentException e ) { } try { q . offer ( "" , null ) ; org . junit . Assert . fail ( "null<sp>op<sp>offer<sp>should<sp>have<sp>failed" ) ; } catch ( java . lang . IllegalArgumentException e ) { } java . util . List < com . vmware . xenon . common . Operation > ops = new java . util . ArrayList ( ) ; for ( int i = 0 ; i < ( this . count ) ; i ++ ) { com . vmware . xenon . common . Operation op = com . vmware . xenon . common . Operation . createPost ( null ) ; ops . add ( op ) ; q . offer ( "" , op ) ; } "<AssertPlaceHolder>" ; for ( int i = 0 ; i < ( ops . size ( ) ) ; i ++ ) { com . vmware . xenon . common . Operation op = ops . get ( i ) ; com . vmware . xenon . common . Operation qOp = q . poll ( ) ; if ( ( qOp . getId ( ) ) != ( op . getId ( ) ) ) { org . junit . Assert . fail ( "unexpected<sp>operation<sp>from<sp>queue" ) ; } } } isEmpty ( ) { return this . infoBySearcher . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( ( ! ( q . isEmpty ( ) ) ) )
shouldSupportEmbeddedChars ( ) { final java . lang . Object result = udf . timestampToString ( 1638360611123L , "yyyy-MM-dd'T'HH:mm:ss.SSS'Fred'" ) ; final java . lang . String expectedResult = new java . text . SimpleDateFormat ( "yyyy-MM-dd'T'HH:mm:ss.SSS'Fred'" ) . format ( new java . util . Date ( 1638360611123L ) ) ; "<AssertPlaceHolder>" ; } format ( org . apache . kafka . clients . consumer . ConsumerRecords ) { return java . util . stream . StreamSupport . stream ( records . records ( topicName ) . spliterator ( ) , false ) . filter ( Objects :: nonNull ) . filter ( ( r ) -> ( r . value ( ) ) != null ) . map ( ( record ) -> { if ( ( formatter ) == null ) { formatter = getFormatter ( record ) ; } try { return formatter . print ( record ) ; } catch ( e ) { RecordFormatter . log . warn ( "Exception<sp>formatting<sp>record" , io . confluent . ksql . rest . server . resources . streaming . e ) ; return null ; } } ) . filter ( Objects :: nonNull ) . collect ( java . util . stream . Collectors . toList ( ) ) ; }
org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( expectedResult ) )
testSyncTokenToJsonWithUuid ( ) { java . lang . String expected = "{\"t\":\"2015-11-25T11:25:28.000Z\",\"u\":\"i-am-a-uuid\"}" ; java . lang . String result = org . openmrs . projectbuendia . webservices . rest . SyncTokenUtils . syncTokenToJson ( new org . projectbuendia . openmrs . api . SyncToken ( new java . util . Date ( 1448450728000L ) , uuid ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( expected , result )
convertToIndirectWithLargePages ( ) { org . cojen . tupl . DatabaseConfig config = new org . cojen . tupl . DatabaseConfig ( ) . directPageAccess ( false ) . pageSize ( 32768 ) . durabilityMode ( DurabilityMode . NO_SYNC ) ; org . cojen . tupl . Database db = newTempDatabase ( getClass ( ) , decorate ( config ) ) ; org . cojen . tupl . Index ix = db . openIndex ( "test" ) ; byte [ ] key = "hello" . getBytes ( ) ; java . util . Random rnd = new java . util . Random ( 8675309 ) ; byte [ ] value = new byte [ 20000000 ] ; rnd . nextBytes ( value ) ; ix . store ( Transaction . BOGUS , key , value ) ; byte [ ] extend = new byte [ 80000000 ] ; rnd . nextBytes ( extend ) ; org . cojen . tupl . ValueAccessor accessor = ix . newAccessor ( Transaction . BOGUS , key ) ; accessor . valueWrite ( value . length , extend , 0 , extend . length ) ; "<AssertPlaceHolder>" ; accessor . close ( ) ; byte [ ] full = new byte [ ( value . length ) + ( extend . length ) ] ; java . lang . System . arraycopy ( value , 0 , full , 0 , value . length ) ; java . lang . System . arraycopy ( extend , 0 , full , value . length , extend . length ) ; value = null ; extend = null ; fastAssertArrayEquals ( full , ix . load ( Transaction . BOGUS , key ) ) ; } valueLength ( ) { return mSource . valueLength ( ) ; }
org . junit . Assert . assertEquals ( ( ( value . length ) + ( extend . length ) ) , accessor . valueLength ( ) )
testAllocateDirect ( ) { byte [ ] bbs = new byte [ ] { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 } ; java . nio . ByteBuffer byteBuffer = java . nio . ByteBuffer . allocateDirect ( ( ( bbs . length ) + 4 ) ) . putInt ( bbs . length ) . put ( bbs ) ; byteBuffer . flip ( ) ; int anInt = byteBuffer . getInt ( ) ; "<AssertPlaceHolder>" ; byte [ ] bs = new byte [ anInt ] ; byteBuffer . get ( bs ) ; } flip ( ) { this . buf . flip ( ) ; return this ; }
org . junit . Assert . assertEquals ( bbs . length , anInt )
testAlign ( ) { java . lang . String expected = "<p<sp>style=\"text-align:<sp>center\">text</p>" ; java . lang . String actual = _htmlBBCodeTranslator . parse ( "[center]text[/center]" ) ; "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { if ( com . liferay . portal . kernel . util . Validator . isNull ( s ) ) { throw new java . lang . IllegalArgumentException ( ( "Invalid<sp>image<sp>adaptive<sp>media<sp>configuration:<sp>" + s ) ) ; } java . lang . String [ ] fields = com . liferay . adaptive . media . image . internal . configuration . AMImageConfigurationEntryParser . _fieldSeparatorPattern . split ( s ) ; if ( ( ( fields . length ) != 4 ) && ( ( fields . length ) != 5 ) ) { throw new java . lang . IllegalArgumentException ( ( "Invalid<sp>image<sp>adaptive<sp>media<sp>configuration:<sp>" + s ) ) ; } java . lang . String name = fields [ 0 ] ; name = _http . decodeURL ( name ) ; java . lang . String description = fields [ 1 ] ; description = _http . decodeURL ( description ) ; java . lang . String uuid = fields [ 2 ] ; if ( ( com . liferay . portal . kernel . util . Validator . isNull ( name ) ) || ( com . liferay . portal . kernel . util . Validator . isNull ( uuid ) ) ) { throw new java . lang . IllegalArgumentException ( ( "Invalid<sp>image<sp>adaptive<sp>media<sp>configuration:<sp>" + s ) ) ; } java . lang . String [ ] attributes = com . liferay . adaptive . media . image . internal . configuration . AMImageConfigurationEntryParser . _attributeSeparatorPattern . split ( fields [ 3 ] ) ; java . util . Map < java . lang . String , java . lang . String > properties = new java . util . HashMap ( ) ; for ( java . lang . String attribute : attributes ) { java . lang . String [ ] keyValuePair = com . liferay . adaptive . media . image . internal . configuration . AMImageConfigurationEntryParser . _keyValueSeparatorPattern . split ( attribute ) ; properties . put ( keyValuePair [ 0 ] , keyValuePair [ 1 ] ) ; } boolean enabled = true ; if ( ( fields . length ) == 5 ) { java . lang . String disabledAttribute = fields [ 4 ] ; java . util . regex . Matcher matcher = com . liferay . adaptive . media . image . internal . configuration . AMImageConfigurationEntryParser . _disabledSeparatorPattern . matcher ( disabledAttribute ) ; if ( ! ( matcher . matches ( ) ) ) { throw new java . lang . IllegalArgumentException ( ( "Invalid<sp>image<sp>adaptive<sp>media<sp>configuration:<sp>" + s ) ) ; } enabled = com . liferay . portal . kernel . util . GetterUtil . getBoolean ( matcher . group ( 1 ) ) ; } return new com . liferay . adaptive . media . image . internal . configuration . AMImageConfigurationEntryImpl ( name , description , uuid , properties , enabled ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testMaterializeOfEmptyIntermediatePCollection_MemPipeline ( ) { org . apache . crunch . PCollection < java . lang . String > emptyIntermediate = createPesistentEmptyIntermediate ( org . apache . crunch . impl . mem . MemPipeline . getInstance ( ) ) ; "<AssertPlaceHolder>" ; } materialize ( ) { try { materialized = source . read ( pipeline . getConfiguration ( ) ) ; } catch ( java . io . IOException e ) { org . apache . crunch . materialize . MaterializableIterable . LOG . error ( "Could<sp>not<sp>materialize:<sp>{}" , source , e ) ; throw new org . apache . crunch . CrunchRuntimeException ( e ) ; } }
org . junit . Assert . assertThat ( newArrayList ( emptyIntermediate . materialize ( ) ) . size ( ) , org . hamcrest . Matchers . is ( 0 ) )
testFailValidation ( ) { final java . lang . String message = "message" ; try { validator . failValidation ( message ) ; org . junit . Assert . fail ( ) ; } catch ( org . eclipse . dawnsci . nexus . validation . NexusValidationException e ) { "<AssertPlaceHolder>" ; } } getMessage ( ) { return message ; }
org . junit . Assert . assertEquals ( message , e . getMessage ( ) )
readItemDescriptionWithIOException ( ) { java . lang . String fileName = "DummyName" ; mockStatic ( com . codecentric . sample . store . service . tools . StaticService . class ) ; when ( com . codecentric . sample . store . service . tools . StaticService . readFile ( fileName ) ) . thenThrow ( java . io . IOException . class ) ; java . lang . String value = itemService . readItemDescription ( fileName ) ; verifyStatic ( times ( 1 ) ) ; com . codecentric . sample . store . service . tools . StaticService . readFile ( fileName ) ; "<AssertPlaceHolder>" ; } readFile ( java . lang . String ) { return "file<sp>content" ; }
org . junit . Assert . assertThat ( value , org . hamcrest . CoreMatchers . is ( "" ) )
doesNotContainKeyAfterRemove ( ) { io . joynr . util . MultiMap < java . lang . String , java . lang . String > multiMap = new io . joynr . util . MultiMap ( ) ; final java . lang . String key = "key" ; final java . lang . String value = "value" ; multiMap . put ( key , value ) ; multiMap . remove ( key , value ) ; "<AssertPlaceHolder>" ; } containsKey ( java . lang . String ) { boolean containsKey = hashMap . containsKey ( participantId ) ; io . joynr . messaging . routing . RoutingTableImpl . logger . trace ( "checking<sp>for<sp>participant:<sp>{}<sp>success:<sp>{}" , participantId , containsKey ) ; if ( ! containsKey ) { dumpRoutingTableEntry ( ) ; } return containsKey ; }
org . junit . Assert . assertFalse ( multiMap . containsKey ( key ) )
testFailedLessEqualWithGreaterComparison ( ) { new org . opennms . core . criteria . CriteriaBuilder ( org . opennms . netmgt . dao . mock . BeanWrapperVisitorTest . TestBean . class ) . le ( "four" , 1.0 ) . toCriteria ( ) . visit ( m_visitor ) ; "<AssertPlaceHolder>" ; } getMatches ( ) { return ( m_matches ) == null ? "(.*)" : m_matches ; }
org . junit . Assert . assertEquals ( 0 , m_visitor . getMatches ( ) . size ( ) )
dateTest2 ( ) { java . sql . Statement stmt = sharedConnection . createStatement ( ) ; java . sql . ResultSet rs = stmt . executeQuery ( "select<sp>1" ) ; "<AssertPlaceHolder>" ; rs . getDate ( 1 ) ; } next ( ) { if ( isClosed ) { throw new java . sql . SQLException ( "Operation<sp>not<sp>permit<sp>on<sp>a<sp>closed<sp>resultSet" , "HY000" ) ; } if ( ( rowPointer ) < ( ( dataSize ) - 1 ) ) { ( rowPointer ) ++ ; return true ; } else { if ( ( streaming ) && ( ! ( isEof ) ) ) { lock . lock ( ) ; try { if ( ! ( isEof ) ) { nextStreamingValue ( ) ; } } catch ( java . io . IOException ioe ) { throw handleIoException ( ioe ) ; } finally { lock . unlock ( ) ; } if ( ( resultSetScrollType ) == ( TYPE_FORWARD_ONLY ) ) { rowPointer = 0 ; return ( dataSize ) > 0 ; } else { ( rowPointer ) ++ ; return ( dataSize ) > ( rowPointer ) ; } } rowPointer = dataSize ; return false ; } }
org . junit . Assert . assertTrue ( rs . next ( ) )
resolveRefRegion2 ( ) { org . opencb . biodata . models . variant . Variant a = org . opencb . opencga . storage . hadoop . variant . archive . mr . VariantLocalConflictResolverTest . getVariant ( "2:10048155:TCTTTTTTTT:AC" , "SiteConflict" , "220" , "0/1" ) ; org . opencb . biodata . models . variant . Variant b = org . opencb . opencga . storage . hadoop . variant . archive . mr . VariantLocalConflictResolverTest . getVariant ( "2:10048156:T:T" , "PASS" , "." , "0/1" ) ; org . opencb . biodata . models . variant . Variant c = org . opencb . opencga . storage . hadoop . variant . archive . mr . VariantLocalConflictResolverTest . getVariant ( "2:10048157:C:C" , "PASS" , "." , "0/1" ) ; org . opencb . opencga . storage . hadoop . variant . archive . mr . Collection < org . opencb . biodata . models . variant . Variant > resolved = new org . opencb . opencga . storage . hadoop . variant . archive . mr . VariantLocalConflictResolver ( ) . resolveConflicts ( org . opencb . opencga . storage . hadoop . variant . archive . mr . Arrays . asList ( a , b , c ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return size ; }
org . junit . Assert . assertEquals ( 4 , resolved . size ( ) )
testGetValidOrgnummerFromInvalidOrgnummerWrongChecksum ( ) { no . bekk . bekkopen . org . Organisasjonsnummer orgNr = no . bekk . bekkopen . org . OrganisasjonsnummerValidator . getAndForceValidOrganisasjonsnummer ( no . bekk . bekkopen . org . OrganisasjonsnummerValidatorTest . ORGNUMMER_INVALID_CHECKSUM ) ; "<AssertPlaceHolder>" ; } isValid ( java . lang . String ) { try { no . bekk . bekkopen . org . OrganisasjonsnummerValidator . getOrganisasjonsnummer ( organisasjonsnummer ) ; return true ; } catch ( java . lang . IllegalArgumentException e ) { return false ; } }
org . junit . Assert . assertTrue ( no . bekk . bekkopen . org . OrganisasjonsnummerValidator . isValid ( orgNr . toString ( ) ) )
testSetStringArrayProperty ( ) { restGraphDatabase . getReferenceNode ( ) . setProperty ( "name" , new java . lang . String [ ] { "test" } ) ; org . neo4j . graphdb . Node node = restGraphDatabase . getReferenceNode ( ) ; "<AssertPlaceHolder>" ; } getProperty ( java . lang . String ) { return map . get ( prefixedKey ( key ) ) ; }
org . junit . Assert . assertArrayEquals ( new java . lang . String [ ] { "test" } , ( ( java . lang . String [ ] ) ( node . getProperty ( "name" ) ) ) )
shouldReturnCorrectSize ( ) { com . oracle . bedrock . runtime . PropertiesBuilder builder = new com . oracle . bedrock . runtime . PropertiesBuilder ( ) ; builder . setProperty ( "Key-1" , "Value-1" ) ; builder . setProperty ( "Key-2" , "Value-2" ) ; "<AssertPlaceHolder>" ; } size ( ) { return rows . size ( ) ; }
org . junit . Assert . assertThat ( builder . size ( ) , org . hamcrest . CoreMatchers . is ( 2 ) )
testValidateJsonSuccess ( ) { boolean valid = false ; java . lang . String schemaText = null ; java . lang . String jsonText = "{\"name\":<sp>\"307\",<sp>\"model\":<sp>\"Peugeot<sp>307\",<sp>\"year\":<sp>2003}" ; try { schemaText = org . apache . commons . io . FileUtils . readFileToString ( new java . io . File ( "target/test-classes/io/github/microcks/util/car-schema.json" ) ) ; valid = io . github . microcks . util . JsonSchemaValidator . isJsonValid ( schemaText , jsonText ) ; } catch ( java . lang . Exception e ) { org . junit . Assert . fail ( "Exception<sp>should<sp>not<sp>be<sp>thrown" ) ; } "<AssertPlaceHolder>" ; } isJsonValid ( java . lang . String , java . lang . String ) { try { java . util . List < java . lang . String > errors = io . github . microcks . util . JsonSchemaValidator . validateJson ( schemaText , jsonText ) ; if ( ! ( errors . isEmpty ( ) ) ) { io . github . microcks . util . JsonSchemaValidator . log . debug ( "Get<sp>validation<sp>errors,<sp>returning<sp>false" ) ; return false ; } } catch ( com . github . fge . jsonschema . core . exceptions . ProcessingException pe ) { io . github . microcks . util . JsonSchemaValidator . log . debug ( "Got<sp>processing<sp>exception<sp>while<sp>extracting<sp>schema,<sp>returning<sp>false" ) ; return false ; } return true ; }
org . junit . Assert . assertTrue ( valid )
testGetSuperclassObjectSuperclassIsObject ( ) { compile ( "class<sp>Foo<sp>extends<sp>java.lang.Object<sp>{<sp>}" ) ; javax . lang . model . element . TypeElement fooElement = elements . getTypeElement ( "Foo" ) ; javax . lang . model . type . DeclaredType superclass = ( ( javax . lang . model . type . DeclaredType ) ( fooElement . getSuperclass ( ) ) ) ; javax . lang . model . element . TypeElement objectElement = elements . getTypeElement ( "java.lang.Object" ) ; "<AssertPlaceHolder>" ; } asElement ( ) { return element ; }
org . junit . Assert . assertSame ( objectElement , superclass . asElement ( ) )
storeProperties_shouldEscapeSlashes ( ) { java . nio . charset . Charset utf8 = java . nio . charset . StandardCharsets . UTF_8 ; java . lang . String expectedProperty = "blacklistRegex" ; java . lang . String expectedValue = "[^\\p{InBasicLatin}\\p{InLatin1Supplement}]" ; java . util . Properties properties = new java . util . Properties ( ) ; properties . setProperty ( expectedProperty , expectedValue ) ; java . io . ByteArrayOutputStream actual = new java . io . ByteArrayOutputStream ( ) ; java . io . ByteArrayOutputStream expected = new java . io . ByteArrayOutputStream ( ) ; org . openmrs . util . OpenmrsUtil . storeProperties ( properties , actual , null ) ; properties . store ( new java . io . OutputStreamWriter ( expected , utf8 ) , null ) ; "<AssertPlaceHolder>" ; } storeProperties ( java . util . Properties , java . io . File , java . lang . String ) { java . io . OutputStream outStream = null ; try { outStream = new java . io . FileOutputStream ( file , true ) ; org . openmrs . util . OpenmrsUtil . storeProperties ( properties , outStream , comment ) ; } catch ( java . io . IOException ex ) { org . openmrs . util . OpenmrsUtil . log . error ( ( ( "Unable<sp>to<sp>create<sp>file<sp>" + ( file . getAbsolutePath ( ) ) ) + "<sp>in<sp>storeProperties<sp>routine." ) ) ; } finally { try { if ( outStream != null ) { outStream . close ( ) ; } } catch ( java . io . IOException ioe ) { } } }
org . junit . Assert . assertThat ( actual . toByteArray ( ) , org . hamcrest . Matchers . is ( expected . toByteArray ( ) ) )
doSomethingdate ( ) { ch11 . DateDependencyExample sut = new ch11 . DateDependencyExample ( ) ; sut . doSomething ( ) ; "<AssertPlaceHolder>" ; } doSomething ( ) { this . date = dateFactory . newDate ( ) ; }
org . junit . Assert . assertThat ( sut . date , org . hamcrest . CoreMatchers . is ( new java . util . Date ( ) ) )
testCleanup ( ) { org . apache . hadoop . conf . Configuration conf = org . apache . hadoop . tools . TestExternalCall . getConf ( ) ; org . apache . hadoop . fs . Path stagingDir = org . apache . hadoop . mapreduce . JobSubmissionFiles . getStagingDir ( new org . apache . hadoop . mapreduce . Cluster ( conf ) , conf ) ; stagingDir . getFileSystem ( conf ) . mkdirs ( stagingDir ) ; org . apache . hadoop . fs . Path soure = createFile ( "tmp.txt" ) ; org . apache . hadoop . fs . Path target = createFile ( "target.txt" ) ; org . apache . hadoop . tools . DistCp distcp = new org . apache . hadoop . tools . DistCp ( conf , null ) ; java . lang . String [ ] arg = new java . lang . String [ ] { soure . toString ( ) , target . toString ( ) } ; distcp . run ( arg ) ; "<AssertPlaceHolder>" ; } exists ( org . apache . hadoop . fs . Path ) { incrementStatistic ( org . apache . hadoop . fs . s3a . INVOCATION_EXISTS ) ; return super . exists ( f ) ; }
org . junit . Assert . assertTrue ( org . apache . hadoop . tools . TestExternalCall . fs . exists ( target ) )
testCaseSensitiveExtraction ( ) { org . apache . druid . query . search . SearchQuerySpec spec = new org . apache . druid . query . search . FragmentSearchQuerySpec ( java . util . Arrays . asList ( "to" , "yo" ) , true ) ; org . apache . druid . query . extraction . ExtractionFn extractionFn = new org . apache . druid . query . extraction . SearchQuerySpecDimExtractionFn ( spec ) ; java . util . List < java . lang . String > expected = com . google . common . collect . ImmutableList . of ( "Kyoto" ) ; java . util . List < java . lang . String > extracted = new java . util . ArrayList ( ) ; for ( java . lang . String str : org . apache . druid . query . extraction . SearchQuerySpecDimExtractionFnTest . testStrings ) { java . lang . String res = extractionFn . apply ( str ) ; if ( res != null ) { extracted . add ( res ) ; } } "<AssertPlaceHolder>" ; } add ( int ) { set ( length ( ) , value ) ; }
org . junit . Assert . assertEquals ( expected , extracted )
testGetIllegalArgument ( ) { final net . sf . qualitycheck . exception . IllegalArgumentHolder < java . lang . Object > iah = new net . sf . qualitycheck . exception . IllegalNotLesserThanException ( ( - 2 ) ) ; "<AssertPlaceHolder>" ; } getIllegalArgument ( ) { return illegalArgumentValue ; }
org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( ( - 2 ) ) , iah . getIllegalArgument ( ) )
testSelfTestDirIsNullByDefault ( ) { "<AssertPlaceHolder>" ; } getSelfTestDir ( ) { return selfTestDir ; }
org . junit . Assert . assertNull ( configuration . getSelfTestDir ( ) )
testGetByIds ( ) { java . util . List < com . baidu . beidou . sample . annotation . vo . Company > result = companyMgr . getByIds ( java . util . Arrays . asList ( new java . lang . Integer [ ] { 88 , 99 } ) ) ; System . out . println ( result ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertThat ( result . size ( ) , org . hamcrest . Matchers . is ( 2 ) )
testFindSQLExceptionWithSQLException ( ) { java . sql . SQLException inputException = new java . sql . SQLException ( "This<sp>is<sp>what<sp>we<sp>are<sp>looking<sp>for" ) ; java . sql . SQLException sqlException = org . sagebionetworks . repo . model . dbo . dao . table . TableExceptionTranslatorImpl . findSQLException ( inputException ) ; "<AssertPlaceHolder>" ; } findSQLException ( java . lang . Throwable ) { java . lang . Throwable cause = exception ; while ( cause != null ) { if ( cause instanceof java . sql . SQLException ) { return ( ( java . sql . SQLException ) ( cause ) ) ; } else { cause = cause . getCause ( ) ; } } return null ; }
org . junit . Assert . assertEquals ( inputException , sqlException )
deleteObjectFactoryIntfPropsNotPresent ( ) { java . io . File wsdl = getCodegenQEDataFileInput ( "AdcommerceConfigGroupMarketV1.wsdl" ) ; java . lang . String [ ] testArgs = new java . lang . String [ ] { "-servicename" , "-dest" 7 , "-genType" , "-dest" 4 , "-wsdl" , wsdl . getAbsolutePath ( ) , "-dest" 6 , "http://www.ebayopensource.org/turmeric/runtime/types" , "-dest" , destDir . getAbsolutePath ( ) , "-dest" 2 , "-dest" 8 , "-dest" 1 , "COMMON" , "-bin" , binDir . getAbsolutePath ( ) , "-dest" 5 , prDir . getAbsolutePath ( ) , "-noObjectFactoryGeneration" , "-dest" 3 } ; performDirectCodeGen ( testArgs , binDir ) ; java . io . File file = new java . io . File ( ( ( destDir . getAbsolutePath ( ) ) + "/gen-src/com/ebayopensource/turmeric/services/ObjectFactory.java" ) ) ; "<AssertPlaceHolder>" ; } exists ( ) { return legacyPropertiesFile . exists ( ) ; }
org . junit . Assert . assertFalse ( file . exists ( ) )
testHasInstanceId3 ( ) { com . liferay . portal . kernel . model . PortletInstance portletInstance = com . liferay . portal . kernel . model . PortletInstance . fromPortletInstanceKey ( getPortletInstanceKey ( PortletKeys . TEST , 1234 ) ) ; "<AssertPlaceHolder>" ; } hasInstanceId ( ) { return com . liferay . portal . kernel . util . Validator . isNotNull ( _instanceId ) ; }
org . junit . Assert . assertFalse ( portletInstance . hasInstanceId ( ) )
testGetExpectedActivityEntries ( ) { org . apache . shindig . protocol . RestfulCollection < org . apache . shindig . social . opensocial . model . ActivityEntry > responseItem = db . getActivityEntries ( com . google . common . collect . ImmutableSet . of ( org . apache . shindig . social . sample . spi . JsonDbOpensocialServiceTest . JOHN_DOE ) , org . apache . shindig . social . sample . spi . JsonDbOpensocialServiceTest . SELF_GROUP , org . apache . shindig . social . sample . spi . JsonDbOpensocialServiceTest . APP_ID , java . util . Collections . < java . lang . String > emptySet ( ) , null , new org . apache . shindig . common . testing . FakeGadgetToken ( ) ) . get ( ) ; "<AssertPlaceHolder>" ; } getTotalResults ( ) { return totalResults ; }
org . junit . Assert . assertSame ( 3 , responseItem . getTotalResults ( ) )
constructorLoadedForRelationArgumentShouldMarkAsRelation ( ) { ch . puzzle . itc . mobiliar . business . property . entity . ResourceEditProperty . Origin loadedFor = ResourceEditProperty . Origin . RELATION ; resourceEditProperty = new ch . puzzle . itc . mobiliar . builders . ResourceEditPropertyBuilder ( ) . withLoadedFor ( loadedFor ) . build ( ) ; "<AssertPlaceHolder>" ; } isRelationProperty ( ) { return ( ( ( loadedFor ) != null ) && ( ( loadedFor ) == ( ch . puzzle . itc . mobiliar . business . property . entity . ResourceEditProperty . Origin . RELATION ) ) ) || ( ( loadedFor ) == ( ch . puzzle . itc . mobiliar . business . property . entity . ResourceEditProperty . Origin . TYPE_REL ) ) ; }
org . junit . Assert . assertTrue ( resourceEditProperty . isRelationProperty ( ) )
canHandleDataAlreadyPresentSeparatedByNewline ( ) { java . util . List < java . lang . String > expected = java . util . Arrays . asList ( "a" , "b" , "c" ) ; org . ardulink . core . StreamReader reader = process ( new java . io . ByteArrayInputStream ( "a\nb\nc\n" . getBytes ( ) ) , "\n" , expected ) ; waitUntil ( expected . size ( ) ) ; "<AssertPlaceHolder>" ; reader . close ( ) ; } waitUntil ( int ) { while ( ( received . size ( ) ) != size ) { org . ardulink . core . MILLISECONDS . sleep ( 100 ) ; } }
org . junit . Assert . assertThat ( received , org . hamcrest . CoreMatchers . is ( expected ) )
bcryptViaBCryptTest ( ) { java . lang . String encodedValue = com . jedivision . Hash . bcryptViaBCrypt ( com . jedivision . HashTest . GLOBAL_VALUE ) ; boolean matched = org . mindrot . jbcrypt . BCrypt . checkpw ( com . jedivision . HashTest . GLOBAL_VALUE , encodedValue ) ; "<AssertPlaceHolder>" ; } bcryptViaBCrypt ( java . lang . String ) { com . jedivision . Hash . LOGGER . debug ( "Hashing<sp>{}<sp>with<sp>bcrypt<sp>hashing<sp>algorithm" , value ) ; return org . mindrot . jbcrypt . BCrypt . hashpw ( value , org . mindrot . jbcrypt . BCrypt . gensalt ( 12 ) ) ; }
org . junit . Assert . assertTrue ( matched )
testColumnMean ( ) { org . nd4j . linalg . api . ndarray . INDArray twoByThree = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 4 , 4 , DataType . DOUBLE ) . reshape ( 2 , 2 ) ; org . nd4j . linalg . api . ndarray . INDArray columnMean = twoByThree . mean ( 0 ) ; org . nd4j . linalg . api . ndarray . INDArray assertion = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 2 , 3 } ) ; "<AssertPlaceHolder>" ; } create ( int [ ] , float [ ] [ ] ) { int slices = arrays . length ; org . nd4j . linalg . factory . INDArray ret = org . nd4j . linalg . factory . Nd4j . create ( org . nd4j . linalg . util . ArrayUtil . combine ( new int [ ] { slices } , sliceShape ) ) ; for ( int i = 0 ; i < ( ret . slices ( ) ) ; i ++ ) ret . putSlice ( i , org . nd4j . linalg . factory . Nd4j . create ( arrays [ i ] ) . reshape ( org . nd4j . linalg . util . ArrayUtil . toLongArray ( sliceShape ) ) ) ; return ret ; }
org . junit . Assert . assertEquals ( assertion , columnMean )
testPutAttributes ( ) { java . util . Map < java . lang . String , java . lang . String > result = target . getAttributes ( ) ; "<AssertPlaceHolder>" ; } getAttributes ( ) { return attributes ; }
org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( attributes ) )
testFindPrincipalsRange ( ) { org . apache . jackrabbit . oak . spi . security . principal . TestPrincipalProvider t0 = new org . apache . jackrabbit . oak . spi . security . principal . TestPrincipalProvider ( "p2" , "p3" , "p4" ) ; org . apache . jackrabbit . oak . spi . security . principal . TestPrincipalProvider t1 = new org . apache . jackrabbit . oak . spi . security . principal . TestPrincipalProvider ( "p1" ) ; org . apache . jackrabbit . oak . spi . security . principal . PrincipalProvider cpp = org . apache . jackrabbit . oak . spi . security . principal . CompositePrincipalProvider . of ( java . util . Arrays . asList ( t0 , t1 ) ) ; java . util . List < java . lang . String > out = org . apache . jackrabbit . oak . spi . security . principal . CompositePrincipalProviderTest . getNames ( cpp . findPrincipals ( "p" , false , PrincipalManager . SEARCH_TYPE_ALL , 3 , 1 ) ) ; "<AssertPlaceHolder>" ; } findPrincipals ( java . lang . String , boolean , int , long , long ) { java . util . Iterator < ? extends java . security . Principal > principals = findPrincipals ( nameHint , searchType ) ; if ( ! ( principals . hasNext ( ) ) ) { return java . util . Collections . emptyIterator ( ) ; } java . util . Spliterator < ? extends java . security . Principal > spliterator = java . util . Spliterators . spliteratorUnknownSize ( principals , 0 ) ; java . util . stream . Stream < ? extends java . security . Principal > stream = java . util . stream . StreamSupport . stream ( spliterator , false ) ; stream = stream . sorted ( java . util . Comparator . comparing ( Principal :: getName ) ) ; if ( offset > 0 ) { stream = stream . skip ( offset ) ; } if ( limit >= 0 ) { stream = stream . limit ( limit ) ; } return stream . iterator ( ) ; }
org . junit . Assert . assertArrayEquals ( new java . lang . String [ ] { "p4" } , out . toArray ( new java . lang . String [ 0 ] ) )
testQuickSplit_EmptyString ( ) { java . lang . String [ ] values = net . xenqtt . XenqttUtil . quickSplit ( "" , '/' ) ; "<AssertPlaceHolder>" ; } quickSplit ( java . lang . String , char ) { if ( ( value == null ) || ( value . isEmpty ( ) ) ) { return net . xenqtt . XenqttUtil . EMPTY_STRING_ARRAY ; } int count = net . xenqtt . XenqttUtil . getStringValueCount ( value , delimiter ) ; if ( count == 0 ) { return net . xenqtt . XenqttUtil . EMPTY_STRING_ARRAY ; } java . lang . String [ ] values = new java . lang . String [ count ] ; int start = 0 ; int index = 0 ; char last = delimiter ; for ( int i = 0 ; i < ( value . length ( ) ) ; i ++ ) { char c = value . charAt ( i ) ; if ( ( c != delimiter ) && ( last == delimiter ) ) { start = i ; } else if ( ( c == delimiter ) && ( last != delimiter ) ) { values [ ( index ++ ) ] = value . substring ( start , i ) ; } last = c ; } if ( index == ( count - 1 ) ) { values [ ( index ++ ) ] = value . substring ( start ) ; } return values ; }
org . junit . Assert . assertEquals ( 0 , values . length )
factoryDurableServicePostNoCaching ( ) { this . host . setServiceStateCaching ( false ) ; long count = ( this . host . isStressTest ( ) ) ? 1000 : 10 ; com . vmware . xenon . services . common . MinimalFactoryTestService f = new com . vmware . xenon . services . common . MinimalFactoryTestService ( ) ; f . setSelfQueryResultLimit ( ( ( FactoryService . SELF_QUERY_RESULT_LIMIT ) / 10 ) ) ; "<AssertPlaceHolder>" ; f . toggleOption ( ServiceOption . PERSISTENCE , true ) ; com . vmware . xenon . services . common . MinimalFactoryTestService factoryService = ( ( com . vmware . xenon . services . common . MinimalFactoryTestService ) ( this . host . startServiceAndWait ( f , java . util . UUID . randomUUID ( ) . toString ( ) , null ) ) ) ; factoryService . setChildServiceCaps ( java . util . EnumSet . of ( ServiceOption . PERSISTENCE ) ) ; doFactoryServiceChildCreation ( java . util . EnumSet . of ( ServiceOption . PERSISTENCE ) , java . util . EnumSet . of ( TestProperty . DELETE_DURABLE_SERVICE ) , count , factoryService . getUri ( ) ) ; } getSelfQueryResultLimit ( ) { return this . selfQueryResultLimit ; }
org . junit . Assert . assertEquals ( ( ( FactoryService . SELF_QUERY_RESULT_LIMIT ) / 10 ) , f . getSelfQueryResultLimit ( ) )
testParamsAndPropsTransferredThrough ( ) { final java . util . List < java . lang . Object > outVals = new java . util . ArrayList < java . lang . Object > ( ) ; sherpa . server . DummyQueryResponder queryResponder = new sherpa . server . DummyQueryResponder ( 10 ) { public sherpa . protocol . QueryResponse query ( sherpa . protocol . QueryRequest req ) throws org . apache . avro . AvroRemoteException { outVals . add ( req . parameters ) ; outVals . add ( req . properties ) ; return super . query ( req ) ; } } ; sherpa . client . QueryExecution mgr = new sherpa . client . QueryExecution ( queryResponder ) ; java . util . Map < java . lang . String , java . lang . String > params = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; params . put ( "abc" , "def" ) ; java . util . Map < java . lang . String , java . lang . String > props = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; props . put ( "ghi" , "jkl" ) ; mgr . query ( "SELECT<sp>foo" , params , props ) ; "<AssertPlaceHolder>" ; } query ( java . lang . String , java . util . Map , java . util . Map ) { if ( ( props != null ) && ( props . containsKey ( sherpa . client . QueryExecution . BATCH_SIZE ) ) ) { this . maxBatchSize = java . lang . Integer . parseInt ( props . get ( sherpa . client . QueryExecution . BATCH_SIZE ) ) ; } sherpa . protocol . QueryRequest request = new sherpa . protocol . QueryRequest ( ) ; request . sparql = command ; request . parameters = ( params != null ) ? sneakyCast ( params ) : new java . util . HashMap < java . lang . CharSequence , java . lang . CharSequence > ( ) ; request . properties = ( props != null ) ? sneakyCast ( props ) : new java . util . HashMap < java . lang . CharSequence , java . lang . CharSequence > ( ) ; try { sherpa . client . QueryExecution . logger . debug ( "Client<sp>sending<sp>query<sp>request<sp>to<sp>server." ) ; sherpa . protocol . QueryResponse response = server . query ( request ) ; sherpa . client . QueryExecution . logger . debug ( "Client<sp>received<sp>query<sp>response<sp>from<sp>server." ) ; queryId = response . queryId ; vars = new java . util . ArrayList < java . lang . String > ( ) ; for ( java . lang . CharSequence cs : response . vars ) { vars . add ( cs . toString ( ) ) ; } } catch ( org . apache . avro . AvroRemoteException e ) { throw toSparqlException ( e ) ; } scheduleMoreRequest ( 1 ) ; }
org . junit . Assert . assertEquals ( 2 , outVals . size ( ) )
convertAndValidateAllTestCffFonts ( ) { java . io . File dir = new java . io . File ( ( ( TestUtils . TEST_PATH ) + "cff/" ) ) ; java . util . List < java . io . File > cffFiles = ( ( java . util . List < java . io . File > ) ( org . apache . commons . io . FileUtils . listFiles ( dir , new java . lang . String [ ] { "cff" } , true ) ) ) ; "<AssertPlaceHolder>" ; for ( java . io . File file : cffFiles ) { org . mabb . fontverter . opentype . OpenTypeFont font = org . mabb . fontverter . TestCFFToOtfConverter . convertAndSaveFile ( file ) ; org . mabb . fontverter . TestUtils . runAllOtfValidators ( font ) ; } }
org . junit . Assert . assertTrue ( ( ( cffFiles . size ( ) ) > 2 ) )
testGetLongValue ( ) { "<AssertPlaceHolder>" ; } getLongValue ( org . drools . core . common . InternalWorkingMemory , java . lang . Object ) { return getShortValue ( workingMemory , object ) ; }
org . junit . Assert . assertEquals ( 1 , this . reader . getLongValue ( null , this . bean ) )
testGetGroupsToLower ( ) { org . apache . hadoop . security . RuleBasedLdapGroupsMapping groupsMapping = org . mockito . Mockito . spy ( new org . apache . hadoop . security . RuleBasedLdapGroupsMapping ( ) ) ; java . util . List < java . lang . String > groups = new java . util . ArrayList ( ) ; groups . add ( "GROUP1" ) ; groups . add ( "GROUP2" ) ; org . mockito . Mockito . doReturn ( groups ) . when ( ( ( org . apache . hadoop . security . LdapGroupsMapping ) ( groupsMapping ) ) ) . doGetGroups ( eq ( "admin" ) , anyInt ( ) ) ; org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . conf . Configuration ( ) ; conf . set ( LdapGroupsMapping . LDAP_URL_KEY , "ldap://test" ) ; conf . set ( org . apache . hadoop . security . RuleBasedLdapGroupsMapping . CONVERSION_RULE_KEY , "to_lower" ) ; groupsMapping . setConf ( conf ) ; java . util . List < java . lang . String > groupsLower = new java . util . ArrayList ( ) ; groupsLower . add ( "group1" ) ; groupsLower . add ( "group2" ) ; "<AssertPlaceHolder>" ; } getGroups ( org . apache . hadoop . ozone . web . handlers . UserArgs ) { return null ; }
org . junit . Assert . assertEquals ( groupsLower , groupsMapping . getGroups ( "admin" ) )
testGeenWaarde ( ) { final java . util . List < nl . bzk . migratiebrp . conversie . model . brp . BrpStapel < nl . bzk . migratiebrp . conversie . model . brp . groep . BrpIstRelatieGroepInhoud > > brpInhoud = mapper . map ( null ) ; "<AssertPlaceHolder>" ; } map ( java . util . Set ) { if ( ( persoonAdresSet == null ) || ( persoonAdresSet . isEmpty ( ) ) ) { return null ; } else { return mapper . map ( persoonAdresSet . iterator ( ) . next ( ) . getPersoonAdresHistorieSet ( ) ) ; } }
org . junit . Assert . assertNull ( brpInhoud )
testPutParser ( ) { java . lang . String brop = ( ( java . lang . String ) ( run ( "CONFIG_GET('PARSER',<sp>'testParserPut')" , context ) ) ) ; run ( "CONFIG_PUT('PARSER',<sp>config,<sp>'testParserPut')" , com . google . common . collect . ImmutableMap . of ( "config" , brop ) , context ) ; boolean foundMatch = false ; for ( int i = 0 ; ( i < 10 ) && ( ! foundMatch ) ; ++ i ) { java . lang . String bropNew = ( ( java . lang . String ) ( run ( "CONFIG_GET('PARSER',<sp>'testParserPut',<sp>false)" , context ) ) ) ; foundMatch = brop . equals ( bropNew ) ; if ( foundMatch ) { break ; } java . lang . Thread . sleep ( 2000 ) ; } "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == o ) return true ; if ( ( o == null ) || ( ( org . apache . metron . stellar . dsl . Token . getClass ( ) ) != ( o . getClass ( ) ) ) ) return false ; org . apache . metron . stellar . dsl . Token < ? > token = ( ( org . apache . metron . stellar . dsl . Token < ? > ) ( o ) ) ; if ( ( getValue ( ) ) != null ? ! ( getValue ( ) . equals ( token . getValue ( ) ) ) : ( token . getValue ( ) ) != null ) return false ; return ( getUnderlyingType ( ) ) != null ? getUnderlyingType ( ) . equals ( token . getUnderlyingType ( ) ) : ( token . getUnderlyingType ( ) ) == null ; }
org . junit . Assert . assertTrue ( foundMatch )
testDefaultArgumentImplicitlySet2 ( ) { class Field { public java . lang . String name = "parrt" ; public int n = 0 ; @ org . stringtemplate . v4 . test . Override public java . lang . String toString ( ) { return "Field" ; } } java . lang . String templates = ( ( ( ( ( ( "method(fields)<sp>::=<sp><<" + ( newline ) ) + "<fields:{f<sp>|<sp><f:stat()>}>" ) + ( newline ) ) + ">>" ) + ( newline ) ) + "method(fields)<sp>::=<sp><<" 1 x = < value > ; writeFile ( tmpdir , "group.stg" , templates ) ; org . stringtemplate . v4 . STGroup group = new org . stringtemplate . v4 . STGroupFile ( ( ( tmpdir ) + "method(fields)<sp>::=<sp><<" 0 ) ) ; org . stringtemplate . v4 . ST m = group . getInstanceOf ( "method" ) ; m . add ( "fields" , new Field ( ) ) ; java . lang . String expecting = "x=parrt;<sp>//<sp>parrt" ; java . lang . String result = m . render ( ) ; "<AssertPlaceHolder>" ; } render ( ) { return render ( java . util . Locale . getDefault ( ) ) ; }
org . junit . Assert . assertEquals ( expecting , result )
testGetTimeoutTest_nonTimelyMessage_assertUsesGeneralCondtion ( ) { org . nhindirect . monitor . condition . TxTimeoutCondition timelyCond = mock ( org . nhindirect . monitor . condition . TxTimeoutCondition . class ) ; org . nhindirect . monitor . condition . TxTimeoutCondition generalCond = mock ( org . nhindirect . monitor . condition . TxTimeoutCondition . class ) ; org . nhindirect . monitor . condition . impl . VariableTimeoutCondition cond = new org . nhindirect . monitor . condition . impl . VariableTimeoutCondition ( timelyCond , generalCond ) ; org . nhindirect . monitor . condition . impl . VariableTimeoutCondition spy = spy ( cond ) ; org . nhindirect . common . tx . model . Tx tx = mock ( org . nhindirect . common . tx . model . Tx . class ) ; when ( spy . getMessageToTrack ( ( ( java . util . Collection < org . nhindirect . common . tx . model . Tx > ) ( any ( ) ) ) ) ) . thenReturn ( tx ) ; when ( spy . isRelAndTimelyRequired ( ( ( org . nhindirect . common . tx . model . Tx ) ( any ( ) ) ) ) ) . thenReturn ( false ) ; "<AssertPlaceHolder>" ; verify ( timelyCond , never ( ) ) . getTimeout ( ( ( java . util . ArrayList < org . nhindirect . common . tx . model . Tx > ) ( any ( ) ) ) , eq ( ( ( long ) ( 1000 ) ) ) ) ; verify ( generalCond , times ( 1 ) ) . getTimeout ( ( ( java . util . ArrayList < org . nhindirect . common . tx . model . Tx > ) ( any ( ) ) ) , eq ( ( ( long ) ( 1000 ) ) ) ) ; }
org . junit . Assert . assertEquals ( 0 , spy . getTimeout ( new java . util . ArrayList < org . nhindirect . common . tx . model . Tx > ( ) , 1000 ) )
testCollectorToStatsMbeanWithMethodNamePlaceholder ( ) { com . jitlogic . zorka . core . spy . plugins . ZorkaStatsCollector collector = new com . jitlogic . zorka . core . spy . plugins . ZorkaStatsCollector ( mBeanServerRegistry , "test" , "test:name=Test" , "stats" , "stats" 1 , "T" , null , com . jitlogic . zorka . core . spy . plugins . ZorkaStatsCollector . ACTION_STATS ) ; com . jitlogic . zorka . core . spy . SpyContext ctx = new com . jitlogic . zorka . core . spy . SpyContext ( spy . instance ( "x" ) , "TClass" , "stats" 0 , "()V" , 1 ) ; java . util . Map < java . lang . String , java . lang . Object > record = com . jitlogic . zorka . common . util . ZorkaUtil . map ( ".CTX" , ctx , ".STAGE" , com . jitlogic . zorka . core . test . spy . ON_SUBMIT , ".STAGES" , ( 1 << ( ON_RETURN ) ) , "T" , 10L ) ; collector . process ( record ) ; com . jitlogic . zorka . common . stats . MethodCallStatistics stats = ( ( com . jitlogic . zorka . common . stats . MethodCallStatistics ) ( getAttr ( testMbs , "test:name=Test" , "stats" ) ) ) ; "<AssertPlaceHolder>" ; } getStatistic ( java . lang . String ) { int threshold = java . lang . Integer . parseInt ( statisticName ) ; com . jitlogic . zorka . common . stats . MethodSlaStatistic rslt = stats . get ( threshold ) ; if ( rslt == null ) { com . jitlogic . zorka . common . stats . MethodSlaStatistic st = stats . putIfAbsent ( threshold , ( rslt = new com . jitlogic . zorka . common . stats . MethodSlaStatistic ( threshold ) ) ) ; if ( st != null ) { rslt = st ; } } return rslt ; }
org . junit . Assert . assertNotNull ( stats . getStatistic ( "stats" 0 ) )
testMacroCallsWithImportAs ( ) { com . mitchellbosecke . pebble . PebbleEngine pebble = new com . mitchellbosecke . pebble . PebbleEngine . Builder ( ) . extension ( new com . mitchellbosecke . pebble . macro . PebbleExtension ( ) ) . strictVariables ( false ) . build ( ) ; TestFilter . counter = 0 ; com . mitchellbosecke . pebble . template . PebbleTemplate template = pebble . getTemplate ( "templates/macros/import.as.peb" ) ; java . io . Writer writer = new java . io . StringWriter ( ) ; template . evaluate ( writer ) ; "<AssertPlaceHolder>" ; } getCounter ( ) { return com . mitchellbosecke . pebble . macro . TestFilter . counter ; }
org . junit . Assert . assertEquals ( 2 , com . mitchellbosecke . pebble . macro . TestFilter . getCounter ( ) )
testFtpCommandsNullCommand ( ) { java . lang . String inputString = null ; java . lang . String [ ] cmds = org . apache . sqoop . util . MainframeFTPClientUtils . parseFtpCommands ( inputString ) ; "<AssertPlaceHolder>" ; } parseFtpCommands ( java . lang . String ) { if ( org . apache . commons . lang3 . StringUtils . isBlank ( ftpCmds ) ) { return new java . lang . String [ ] { } ; } return java . util . Arrays . stream ( ftpCmds . split ( "," ) ) . map ( String :: trim ) . filter ( org . apache . commons . lang3 . StringUtils :: isNotEmpty ) . toArray ( java . lang . String [ ] :: new ) ; }
org . junit . Assert . assertEquals ( 0 , cmds . length )
malformed_ignore ( ) { com . asakusafw . runtime . io . text . driver . RecordDefinition < java . lang . String [ ] > def = com . asakusafw . runtime . io . text . driver . RecordDefinition . builder ( java . lang . String [ ] . class ) . withField ( self ( ) , field ( 0 ) . build ( ) ) . withField ( self ( ) , malformField ( 1 ) . withOnMalformedInput ( ErrorAction . IGNORE ) . build ( ) ) . withField ( self ( ) , field ( 2 ) . build ( ) ) . build ( ) ; java . lang . String [ ] [ ] results = collect ( def , new java . lang . String [ ] [ ] { new java . lang . String [ ] { "A" , "B" , "C" } } ) ; "<AssertPlaceHolder>" ; } is ( java . lang . CharSequence , int , char ) { return ( string . charAt ( column ) ) == value ; }
org . junit . Assert . assertThat ( results , is ( new java . lang . String [ ] [ ] { new java . lang . String [ ] { "A" , null , "C" } } ) )
testImmediate ( ) { System . out . println ( "testing<sp>with<sp>immediate<sp>state<sp>loading" ) ; org . joo . steak . test . states . TestStateContext stateContext = new org . joo . steak . test . states . TestStateContext ( "default" , 0 ) ; org . joo . steak . framework . config . StateEngineConfiguration configuration = setupPrototypeConfiguration ( ) ; org . joo . steak . framework . StateManager manager = new org . joo . steak . impl . DefaultStateManager ( ) ; manager . initialize ( stateContext , configuration , null ) ; manager . run ( ) ; "<AssertPlaceHolder>" ; System . out . println ( "\n----------\n" ) ; } getData ( ) { return data ; }
org . junit . Assert . assertEquals ( 1 , stateContext . getData ( ) )
nonPublicValueOf ( ) { com . pholser . util . properties . BindingUntypedResourceBundlesToTypedInterfacesTest . NonPublicValueOfHaver . Thing thing = new com . pholser . util . properties . BindingUntypedResourceBundlesToTypedInterfacesTest . NonPublicValueOfHaver . Thing ( ) ; java . util . ResourceBundle bundle = bundleWith ( "non.public.value.of" , thing ) ; com . pholser . util . properties . PropertyBinder < com . pholser . util . properties . BindingUntypedResourceBundlesToTypedInterfacesTest . NonPublicValueOfHaver > binder = com . pholser . util . properties . PropertyBinder . forType ( com . pholser . util . properties . BindingUntypedResourceBundlesToTypedInterfacesTest . NonPublicValueOfHaver . class ) ; com . pholser . util . properties . BindingUntypedResourceBundlesToTypedInterfacesTest . NonPublicValueOfHaver bound = binder . bind ( bundle ) ; "<AssertPlaceHolder>" ; } bind ( com . pholser . util . properties . PropertySource ) { return evaluate ( source ) ; }
org . junit . Assert . assertSame ( thing , bound . thing ( ) )
testGetCode ( ) { final nl . bzk . migratiebrp . conversie . model . lo3 . element . Lo3LandCode landCode = new nl . bzk . migratiebrp . conversie . model . lo3 . element . Lo3LandCode ( nl . bzk . migratiebrp . conversie . model . lo3 . element . Lo3LandCodeTest . STRING_1234 ) ; "<AssertPlaceHolder>" ; } getWaarde ( ) { return waarde ; }
org . junit . Assert . assertEquals ( nl . bzk . migratiebrp . conversie . model . lo3 . element . Lo3LandCodeTest . STRING_1234 , landCode . getWaarde ( ) )
testRelax2 ( ) { fr . inria . corese . core . Graph g = fr . inria . corese . core . GraphStore . create ( ) ; fr . inria . corese . core . query . QueryProcess exec = fr . inria . corese . core . query . QueryProcess . create ( g ) ; java . lang . String i = "insert<sp>data<sp>{<sp>" + ( "us:John<sp>rdfs:label<sp>'John'<sp>" + "}" ) ; exec . query ( i ) ; java . lang . String q = "@relax<sp>kg:literal<sp>" + ( ( "select<sp>*<sp>where<sp>{" + "?x<sp>rdfs:label<sp>'Jon'<sp>" ) + "}" ) ; fr . inria . corese . kgram . core . Mappings map = exec . query ( q ) ; "<AssertPlaceHolder>" ; } size ( ) { return tests . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , map . size ( ) )
testDescribeOptimizeAdviceOnExcessIndex ( ) { try { com . fit2cloud . aliyun . rds . model . request . DescribeOptimizeAdviceOnExcessIndexRequest request = new com . fit2cloud . aliyun . rds . model . request . DescribeOptimizeAdviceOnExcessIndexRequest ( ) ; request . setDBInstanceId ( dBInstanceId ) ; com . fit2cloud . aliyun . Response response = client . describeOptimizeAdviceOnExcessIndex ( request ) ; System . out . println ( ( "testDescribeOptimizeAdviceOnExcessIndex<sp>::<sp>" + ( new com . google . gson . Gson ( ) . toJson ( response ) ) ) ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; org . junit . Assert . fail ( e . getMessage ( ) ) ; } } describeOptimizeAdviceOnExcessIndex ( com . fit2cloud . aliyun . rds . model . request . DescribeOptimizeAdviceOnExcessIndexRequest ) { return listPageableData ( describeOptimizeAdviceOnExcessIndexRequest , "DescribeOptimizeAdviceOnExcessIndex" , com . fit2cloud . aliyun . rds . model . response . DescribeOptimizeAdviceOnExcessIndexResponse . class ) ; }
org . junit . Assert . assertTrue ( true )
testRewriteHostNoRewrite ( ) { javax . servlet . http . HttpServletRequest request = buildGoogleDotComServletRequest ( ) ; com . woonoz . proxy . servlet . UrlRewriter rewriter = new com . woonoz . proxy . servlet . UrlRewriterImpl ( request , buildRedirectUrl ( ) ) ; java . lang . String perduDotComHost = "www.perdu.com" ; "<AssertPlaceHolder>" ; org . easymock . EasyMock . verify ( request ) ; } rewriteHost ( java . lang . String ) { java . net . URI hostAsUri = new java . net . URI ( ( "http://" + host ) ) ; if ( hostIsSameAsServletHost ( hostAsUri ) ) { return getTargetHostString ( ) ; } else { return host ; } }
org . junit . Assert . assertEquals ( perduDotComHost , rewriter . rewriteHost ( perduDotComHost ) )
canBeNull ( ) { toDoItem . setAttachment ( ( ( org . apache . isis . applib . value . Blob ) ( null ) ) ) ; "<AssertPlaceHolder>" ; } getAttachment ( ) { return attachment ; }
org . junit . Assert . assertThat ( toDoItem . getAttachment ( ) , org . hamcrest . CoreMatchers . is ( ( ( org . apache . isis . applib . value . Blob ) ( null ) ) ) )
testIsMapFieldMapOfStringSets_EmptyMaps ( ) { java . util . Map < java . lang . String , java . util . Set < java . lang . String > > roleMap = new java . util . HashMap ( ) ; org . eclipse . sw360 . datahandler . thrift . projects . Project project = new org . eclipse . sw360 . datahandler . thrift . projects . Project ( ) . setName ( "pname" ) . setRoles ( roleMap ) ; boolean b = isMapFieldMapOfStringSets ( Project . _Fields . ROLES , project , project , project , org . apache . log4j . Logger . getLogger ( org . eclipse . sw360 . datahandler . common . CommonUtilsTest . class ) ) ; "<AssertPlaceHolder>" ; } is ( org . eclipse . sw360 . datahandler . common . Predicate ) { return org . eclipse . sw360 . datahandler . common . Predicates . compose ( predicate , transformer ) ; }
org . junit . Assert . assertThat ( b , org . hamcrest . core . Is . is ( false ) )
test5 ( ) { edu . cmu . tetrad . util . RandomUtil . getInstance ( ) . setSeed ( 34828384L ) ; java . util . List < edu . cmu . tetrad . test . Node > nodes1 = new java . util . ArrayList ( ) ; for ( int i = 0 ; i < 3 ; i ++ ) { nodes1 . add ( new edu . cmu . tetrad . data . ContinuousVariable ( ( "X" + ( i + 1 ) ) ) ) ; } edu . cmu . tetrad . test . Dag dag1 = new edu . cmu . tetrad . test . Dag ( edu . cmu . tetrad . test . GraphUtils . randomGraph ( nodes1 , 0 , 3 , 30 , 15 , 15 , false ) ) ; edu . cmu . tetrad . test . Graph pattern = edu . cmu . tetrad . search . SearchGraphUtils . patternForDag ( dag1 ) ; java . util . List < edu . cmu . tetrad . test . Node > nodes = pattern . getNodes ( ) ; int numTiers = 6 ; edu . cmu . tetrad . data . IKnowledge knowledge = new edu . cmu . tetrad . data . Knowledge2 ( ) ; for ( edu . cmu . tetrad . test . Node node : nodes ) { int tier = edu . cmu . tetrad . util . RandomUtil . getInstance ( ) . nextInt ( numTiers ) ; if ( tier < 2 ) continue ; knowledge . addToTier ( tier , node . getName ( ) ) ; } if ( ! ( knowledge . isViolatedBy ( pattern ) ) ) { edu . cmu . tetrad . search . DagInPatternIterator iterator1 = new edu . cmu . tetrad . search . DagInPatternIterator ( pattern ) ; edu . cmu . tetrad . test . Graph dag0 = null ; while ( iterator1 . hasNext ( ) ) { edu . cmu . tetrad . test . Graph dag = iterator1 . next ( ) ; if ( ! ( knowledge . isViolatedBy ( dag ) ) ) { dag0 = dag ; } } if ( dag0 == null ) { org . junit . Assert . fail ( "Inconsistent<sp>knowledge." ) ; } } if ( ! ( knowledge . isViolatedBy ( pattern ) ) ) { edu . cmu . tetrad . search . DagInPatternIterator iterator2 = new edu . cmu . tetrad . search . DagInPatternIterator ( pattern , knowledge ) ; while ( iterator2 . hasNext ( ) ) { edu . cmu . tetrad . test . Graph dag = iterator2 . next ( ) ; if ( knowledge . isViolatedBy ( dag ) ) { throw new java . lang . IllegalArgumentException ( "Knowledge<sp>violated" ) ; } } } edu . cmu . tetrad . search . DagInPatternIterator iterator3 = new edu . cmu . tetrad . search . DagInPatternIterator ( pattern ) ; int count = 0 ; while ( iterator3 . hasNext ( ) ) { iterator3 . next ( ) ; count ++ ; } "<AssertPlaceHolder>" ; } next ( ) { ++ ( index ) ; if ( ( index ) < ( graphs . size ( ) ) ) { return graphs . get ( index ) ; } else { return null ; } }
org . junit . Assert . assertEquals ( 6 , count )
testRegisterFCMDeviceToken ( ) { final java . lang . String testDeviceToken = "bla-bla-bla" ; target . registerDeviceToken ( testDeviceToken ) ; "<AssertPlaceHolder>" ; } getDeviceToken ( ) { return notificationClientBase . getDeviceToken ( ) ; }
org . junit . Assert . assertEquals ( target . getDeviceToken ( ) , testDeviceToken )
testIntWrongType ( ) { com . twelvemonkeys . util . MappedBeanFactoryTestCase . Foo foo = com . twelvemonkeys . util . MappedBeanFactory . as ( com . twelvemonkeys . util . MappedBeanFactoryTestCase . DefaultFoo . class , new java . util . HashMap < java . lang . String , java . lang . Object > ( java . util . Collections . singletonMap ( "bar" , "1" ) ) ) ; "<AssertPlaceHolder>" ; try { foo . getBar ( ) ; org . junit . Assert . fail ( "Expected<sp>ClassCastException" ) ; } catch ( java . lang . ClassCastException expected ) { } try { foo . setBar ( 42 ) ; org . junit . Assert . fail ( "Expected<sp>ClassCastException" ) ; } catch ( java . lang . ClassCastException expected ) { } }
org . junit . Assert . assertNotNull ( foo )
persist ( ) { "<AssertPlaceHolder>" ; final org . superbiz . model . Person p = new org . superbiz . model . Person ( ) ; p . setName ( "Apache<sp>OpenEJB" ) ; em . persist ( p ) ; }
org . junit . Assert . assertNotNull ( em )
testEqualityOfTwoLogConverter ( ) { "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == o ) return true ; if ( ( o == null ) || ( ( tec . uom . se . spi . AbstractMeasurement . getClass ( ) ) != ( o . getClass ( ) ) ) ) return false ; tec . uom . se . spi . AbstractMeasurement < ? > that = ( ( tec . uom . se . spi . AbstractMeasurement < ? > ) ( o ) ) ; return ( quantity . equals ( that . quantity ) ) && ( instant . equals ( that . instant ) ) ; }
org . junit . Assert . assertTrue ( ( ! ( converter . equals ( null ) ) ) )
getCurrentField_standardTest ( ) { expect ( mockScript . jjtGetNumChildren ( ) ) . andReturn ( 0 ) . anyTimes ( ) ; expect ( mockScript . jjtAccept ( isA ( datawave . query . jexl . visitors . EventDataQueryExpressionVisitor . class ) , eq ( "" ) ) ) . andReturn ( null ) ; replayAll ( ) ; org . apache . accumulo . core . data . Key key = new org . apache . accumulo . core . data . Key ( "row" , "column" , ( ( "field" + ( datawave . query . Constants . NULL_BYTE_STRING ) ) + "value" ) ) ; filter = new datawave . query . predicate . TLDEventDataFilter ( mockScript , mockAttributeFactory , null , null , ( - 1 ) , ( - 1 ) ) ; java . lang . String field = filter . getCurrentField ( key ) ; "<AssertPlaceHolder>" ; verifyAll ( ) ; } getCurrentField ( org . apache . accumulo . core . data . Key ) { org . apache . accumulo . core . data . ByteSequence cf = current . getColumnFamilyData ( ) ; if ( ( org . apache . hadoop . io . WritableComparator . compareBytes ( cf . getBackingArray ( ) , 0 , 2 , datawave . query . predicate . TLDEventDataFilter . FI_CF , 0 , 2 ) ) == 0 ) { java . util . ArrayList < java . lang . Integer > nullIndexes = datawave . query . tld . TLD . instancesOf ( 0 , cf , 1 ) ; final int startFn = ( nullIndexes . get ( 0 ) ) + 1 ; final int stopFn = cf . length ( ) ; byte [ ] fn = new byte [ stopFn - startFn ] ; java . lang . System . arraycopy ( cf . getBackingArray ( ) , ( startFn + ( cf . offset ( ) ) ) , fn , 0 , ( stopFn - startFn ) ) ; return datawave . query . jexl . JexlASTHelper . deconstructIdentifier ( new java . lang . String ( fn ) ) ; } else if ( ( org . apache . hadoop . io . WritableComparator . compareBytes ( cf . getBackingArray ( ) , 0 , 2 , datawave . query . predicate . TLDEventDataFilter . TF_CF , 0 , 2 ) ) == 0 ) { org . apache . accumulo . core . data . ByteSequence cq = current . getColumnQualifierData ( ) ; java . util . ArrayList < java . lang . Integer > nullIndexes = datawave . query . tld . TLD . lastInstancesOf ( 0 , cq , 1 ) ; final int startFn = ( nullIndexes . get ( 0 ) ) + 1 ; final int stopFn = cq . length ( ) ; byte [ ] fn = new byte [ stopFn - startFn ] ; java . lang . System . arraycopy ( cq . getBackingArray ( ) , ( startFn + ( cq . offset ( ) ) ) , fn , 0 , ( stopFn - startFn ) ) ; return datawave . query . jexl . JexlASTHelper . deconstructIdentifier ( new java . lang . String ( fn ) ) ; } else { final byte [ ] cq = current . getColumnQualifierData ( ) . getBackingArray ( ) ; final int length = cq . length ; int stopIndex = - 1 ; for ( int i = 0 ; i < ( length - 1 ) ; i ++ ) { if ( ( cq [ i ] ) == 0 ) { stopIndex = i ; break ; } else if ( ( cq [ i ] ) == 46 ) { stopIndex = i ; break ; } } return new java . lang . String ( cq , 0 , stopIndex ) ; } }
org . junit . Assert . assertEquals ( "field" , field )
testWriteOpaqueIdsAsComments ( ) { org . obolibrary . oboformat . model . OBODoc oboDoc = parseOBOFile ( "opaque_ids_test.obo" ) ; java . lang . String oboString = renderOboToString ( oboDoc ) ; java . lang . String [ ] lines = oboString . split ( "\n" ) ; boolean ok = false ; for ( java . lang . String line : lines ) { if ( line . startsWith ( "relationship:" ) ) { if ( line . contains ( "named<sp>relation<sp>y1" ) ) { ok = true ; } } } "<AssertPlaceHolder>" ; } contains ( java . lang . Object ) { if ( o == null ) { return false ; } int oHash = o . hashCode ( ) ; return ( ( checkMatch ( o , oHash , element1 ) ) || ( checkMatch ( o , oHash , element2 ) ) ) || ( checkMatch ( o , oHash , element3 ) ) ; }
org . junit . Assert . assertTrue ( ok )
testCase47 ( ) { org . evosuite . testcase . DefaultTestCase tc = buildTestCase47 ( ) ; java . util . List < org . evosuite . symbolic . BranchCondition > branch_conditions = executeTest ( tc ) ; "<AssertPlaceHolder>" ; } size ( ) { return theTest . size ( ) ; }
org . junit . Assert . assertEquals ( 9 , branch_conditions . size ( ) )
testGeneratingBaseConusmerScenario5 ( ) { haveProperty = false ; haveScpp = false ; java . io . File consumerProps = createPropertyFile ( destDir . getAbsolutePath ( ) , CONSUMER_PROPERTIES ) ; fillProperties ( consumerProper , consumerProps ) ; java . io . File wsdl = getCodegenQEDataFileInput ( "Vanilla-Codegen/ServiceInputFiles" 5 ) ; java . lang . String [ ] testArgs1 = new java . lang . String [ ] { "Vanilla-Codegen/ServiceInputFiles" 0 , "Vanilla-Codegen/ServiceInputFiles" 3 , "-genType" , "Consumer" , "-wsdl" , wsdl . getAbsolutePath ( ) , "-dest" , destDir . getAbsolutePath ( ) , "Vanilla-Codegen/ServiceInputFiles" 8 , ( destDir . getAbsolutePath ( ) ) + "/src" , "Vanilla-Codegen/ServiceInputFiles" 4 , "Vanilla-Codegen/ServiceInputFiles" 9 , "Vanilla-Codegen/ServiceInputFiles" 2 , "COMMON" , "-bin" , binDir . getAbsolutePath ( ) , "Vanilla-Codegen/ServiceInputFiles" 6 , destDir . getAbsolutePath ( ) , "-cn" , "Vanilla-Codegen/ServiceInputFiles" 7 } ; performDirectCodeGen ( testArgs1 , binDir ) ; baseConsumer = ( destDir . getAbsolutePath ( ) ) + "/src/org/ebayopensource/turmeric/common/v1/services/gen/BaseNewService11Consumer.java" ; baseConsumerClass = new java . io . File ( baseConsumer ) ; "<AssertPlaceHolder>" ; } exists ( ) { return legacyPropertiesFile . exists ( ) ; }
org . junit . Assert . assertTrue ( baseConsumerClass . exists ( ) )
shouldPercentEncodeCorrectlyTwitterCodingExamples ( ) { java . lang . String [ ] sources = new java . lang . String [ ] { "Ladies<sp>+<sp>Gentlemen" , "An<sp>encoded<sp>string!" , "Dogs,<sp>Cats<sp>&<sp>Mice" } ; java . lang . String [ ] encoded = new java . lang . String [ ] { "Ladies%20%2B%20Gentlemen" , "An%20encoded%20string%21" , "Dogs%2C%20Cats%20%26%20Mice" } ; for ( int i = 0 ; i < ( sources . length ) ; i ++ ) { "<AssertPlaceHolder>" ; } } encode ( java . lang . String ) { org . agorava . api . service . Preconditions . checkNotNull ( plain , "Cannot<sp>encode<sp>null<sp>object" ) ; java . lang . String encoded = "" ; try { encoded = java . net . URLEncoder . encode ( plain , org . agorava . api . service . OAuthEncoder . CHARSET ) ; } catch ( java . io . UnsupportedEncodingException uee ) { throw new org . agorava . api . exception . AgoravaException ( ( "Charset<sp>not<sp>found<sp>while<sp>encoding<sp>string:<sp>" + ( org . agorava . api . service . OAuthEncoder . CHARSET ) ) , uee ) ; } for ( Map . Entry < java . lang . String , java . lang . String > rule : org . agorava . api . service . OAuthEncoder . ENCODING_RULES . entrySet ( ) ) { encoded = org . agorava . api . service . OAuthEncoder . applyRule ( encoded , rule . getKey ( ) , rule . getValue ( ) ) ; } return encoded ; }
org . junit . Assert . assertEquals ( encoded [ i ] , org . agorava . api . service . OAuthEncoder . encode ( sources [ i ] ) )
getUsersAndGroupsRoles ( ) { when ( getTestResources ( ) . getOrganizationControllerMock ( ) . getSpaceInstById ( anyString ( ) ) ) . thenAnswer ( new org . mockito . stubbing . Answer < com . stratelia . webactiv . beans . admin . SpaceInst > ( ) { @ org . silverpeas . admin . web . Override public com . stratelia . webactiv . beans . admin . SpaceInst answer ( final org . mockito . invocation . InvocationOnMock invocation ) throws java . lang . Throwable { com . stratelia . webactiv . beans . admin . SpaceInst spaceInst = new com . stratelia . webactiv . beans . admin . SpaceInst ( ) ; spaceInst . setId ( ( ( java . lang . String ) ( invocation . getArguments ( ) [ 0 ] ) ) ) ; return spaceInst ; } } ) ; final java . util . Map < com . stratelia . webactiv . SilverpeasRole , org . silverpeas . admin . web . UsersAndGroupsRoleEntity > entity = getAt ( ( ( ( aResourceURI ( expected . getShortId ( ) ) ) + "/" ) + ( USERS_AND_GROUPS_ROLES_URI_PART ) ) , java . util . Map . class ) ; "<AssertPlaceHolder>" ; } aResourceURI ( java . lang . String ) { return ( ( "view/" + ( getExistingComponentInstances ( ) [ 0 ] ) ) + "/attachment/" ) + attachmentId ; }
org . junit . Assert . assertNotNull ( entity )
testOffset ( ) { com . ait . lienzo . client . core . types . Point2D o = new com . ait . lienzo . client . core . types . Point2D ( 50 , 25 ) ; org . kie . workbench . common . stunner . lienzo . toolbox . items . impl . ButtonGridItemImpl cascade = tested . offset ( o ) ; "<AssertPlaceHolder>" ; verify ( toolbox , times ( 1 ) ) . offset ( eq ( o ) ) ; } offset ( com . ait . lienzo . client . core . types . Point2D ) { this . offset = offset ; return checkReposition ( ) ; }
org . junit . Assert . assertEquals ( tested , cascade )
testGetParentShardId ( ) { when ( mockShard . getParentShardId ( ) ) . thenReturn ( TEST_STRING ) ; java . lang . String actual = adapter . getParentShardId ( ) ; "<AssertPlaceHolder>" ; } getParentShardId ( ) { return internalShard . getParentShardId ( ) ; }
org . junit . Assert . assertEquals ( TEST_STRING , actual )
testGetSetHostName ( ) { for ( final java . lang . String validChar : testCharsValid ) { email . setHostName ( validChar ) ; "<AssertPlaceHolder>" ; } } getHostName ( ) { return this . hostName ; }
org . junit . Assert . assertEquals ( validChar , email . getHostName ( ) )
testThrowOnDoubleClose ( ) { try ( io . nats . client . NatsTestServer ts = new io . nats . client . NatsTestServer ( false ) ; io . nats . client . Connection nc = io . nats . client . Nats . connect ( ts . getURI ( ) ) ) { io . nats . client . Dispatcher d = nc . createDispatcher ( ( msg ) -> { } ) ; nc . closeDispatcher ( d ) ; nc . closeDispatcher ( d ) ; "<AssertPlaceHolder>" ; } } closeDispatcher ( io . nats . client . Dispatcher ) { if ( isClosed ( ) ) { throw new java . lang . IllegalStateException ( "Connection<sp>is<sp>Closed" ) ; } else if ( ! ( d instanceof io . nats . client . impl . NatsDispatcher ) ) { throw new java . lang . IllegalArgumentException ( "Connection<sp>can<sp>only<sp>manage<sp>its<sp>own<sp>dispatchers" ) ; } io . nats . client . impl . NatsDispatcher nd = ( ( io . nats . client . impl . NatsDispatcher ) ( d ) ) ; if ( nd . isDraining ( ) ) { return ; } if ( ! ( this . dispatchers . containsKey ( nd . getId ( ) ) ) ) { throw new java . lang . IllegalArgumentException ( "Dispatcher<sp>is<sp>already<sp>closed." ) ; } cleanupDispatcher ( nd ) ; }
org . junit . Assert . assertFalse ( true )
testModifyTicketRemoveHostNullHost ( ) { org . irods . jargon . ticket . packinstr . TicketAdminInp pi = org . irods . jargon . ticket . packinstr . TicketAdminInp . instanceForModifyRemoveAccess ( ticketId , TicketModifyAddOrRemoveTypeEnum . TICKET_MODIFY_HOST , null ) ; "<AssertPlaceHolder>" ; } instanceForModifyRemoveAccess ( java . lang . String , org . irods . jargon . ticket . packinstr . TicketModifyAddOrRemoveTypeEnum , java . lang . String ) { if ( ( ticketId == null ) || ( ticketId . isEmpty ( ) ) ) { throw new java . lang . IllegalArgumentException ( "null<sp>or<sp>empty<sp>ticket<sp>id" ) ; } if ( addTypeEnum == null ) { throw new java . lang . IllegalArgumentException ( "null<sp>modify<sp>remove<sp>permission<sp>type<sp>not<sp>set" ) ; } if ( ( modObject == null ) || ( modObject . isEmpty ( ) ) ) { throw new java . lang . IllegalArgumentException ( "null<sp>or<sp>empty<sp>modify<sp>remove<sp>-<sp>user,<sp>group,<sp>or<sp>host" ) ; } return new org . irods . jargon . ticket . packinstr . TicketAdminInp ( TICKET_ADMIN_INP_API_NBR , "mod" , ticketId , "remove" , addTypeEnum . getTextValue ( ) , modObject , BLANK ) ; }
org . junit . Assert . assertNotNull ( pi )
allSpecs_whenCached ( ) { specificationCache . cache ( org . apache . isis . core . metamodel . specloader . SpecificationCacheDefaultTest . Customer . class . getName ( ) , customerSpec ) ; specificationCache . cache ( org . apache . isis . core . metamodel . specloader . SpecificationCacheDefaultTest . Order . class . getName ( ) , orderSpec ) ; final java . util . Collection < org . apache . isis . core . metamodel . spec . ObjectSpecification > allSpecs = specificationCache . allSpecifications ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return instances . size ( ) ; }
org . junit . Assert . assertThat ( allSpecs . size ( ) , org . hamcrest . CoreMatchers . is ( 2 ) )
isReportingAvailable_EmptyValue ( ) { when ( mock . getVOConfigurationSetting ( eq ( ConfigurationKey . REPORT_ENGINEURL ) , anyString ( ) ) ) . thenReturn ( createSetting ( ConfigurationKey . REPORT_ENGINEURL , "<sp>" ) ) ; "<AssertPlaceHolder>" ; } isReportingAvailable ( ) { org . junit . Assert . assertEquals ( true , bean . isReportingAvailable ( ) ) ; }
org . junit . Assert . assertEquals ( false , bean . isReportingAvailable ( ) )
findsText ( ) { java . util . List < org . eclipse . swt . widgets . Text > textBoxes = controlFinder . findControls ( widgetOfType ( org . eclipse . swt . widgets . Text . class ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return forward . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , textBoxes . size ( ) )
notEqualsByGroupIdValue ( ) { final org . jboss . shrinkwrap . resolver . api . maven . coordinate . MavenDependencyExclusion exclusion1 = new org . jboss . shrinkwrap . resolver . api . maven . coordinate . MavenDependencyExclusionImpl ( "groupId" , "artifactId" ) ; final org . jboss . shrinkwrap . resolver . api . maven . coordinate . MavenDependencyExclusion exclusion2 = new org . jboss . shrinkwrap . resolver . api . maven . coordinate . MavenDependencyExclusionImpl ( "groupId2" , "artifactId" ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } if ( ! ( super . equals ( obj ) ) ) { return false ; } if ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) { return false ; } org . jboss . shrinkwrap . resolver . api . maven . coordinate . MavenCoordinateImpl other = ( ( org . jboss . shrinkwrap . resolver . api . maven . coordinate . MavenCoordinateImpl ) ( obj ) ) ; if ( ( classifier ) == null ) { if ( ( other . classifier ) != null ) { return false ; } } else if ( ! ( classifier . equals ( other . classifier ) ) ) { return false ; } if ( ! ( packaging . equals ( other . packaging ) ) ) { return false ; } return true ; }
org . junit . Assert . assertFalse ( exclusion1 . equals ( exclusion2 ) )
setAndGetStrTest ( ) { try { cn . hutool . core . swing . ClipboardUtil . setStr ( "test" ) ; java . lang . String test = cn . hutool . core . swing . ClipboardUtil . getStr ( ) ; "<AssertPlaceHolder>" ; } catch ( cn . hutool . core . swing . java . awt e ) { } } getStr ( ) { return ( ( java . lang . String ) ( cn . hutool . core . swing . clipboard . ClipboardUtil . get ( DataFlavor . stringFlavor ) ) ) ; }
org . junit . Assert . assertEquals ( "test" , test )
useMockedObjectFromWorkerThreadWhileRecordingAndVerifyingExpectation ( ) { new mockit . Expectations ( ) { { mock . doSomething ( ) ; useMockedCollaboratorFromWorkerThread ( ) ; result = 123 ; } } ; "<AssertPlaceHolder>" ; mock . doSomethingElse ( ) ; new mockit . VerificationsInOrder ( ) { { useMockedCollaboratorFromWorkerThread ( ) ; mock . doSomething ( ) ; mock . doSomethingElse ( ) ; } } ; } doSomething ( ) { return 1 ; }
org . junit . Assert . assertEquals ( 123 , mock . doSomething ( ) )
testImmutableOrNullReturnsNullIfUseStackIsFalse ( ) { final org . apache . logging . log4j . spi . DefaultThreadContextStack stack = new org . apache . logging . log4j . spi . DefaultThreadContextStack ( false ) ; stack . clear ( ) ; "<AssertPlaceHolder>" ; } getImmutableStackOrNull ( ) { return this ; }
org . junit . Assert . assertEquals ( null , stack . getImmutableStackOrNull ( ) )
testGetXUserId_NoUserSession ( ) { org . apache . ranger . security . context . RangerContextHolder . setSecurityContext ( null ) ; java . lang . Long chk = rangerBizUtil . getXUserId ( ) ; "<AssertPlaceHolder>" ; } getXUserId ( ) { org . apache . ranger . common . UserSessionBase currentUserSession = org . apache . ranger . common . ContextUtil . getCurrentUserSession ( ) ; if ( currentUserSession == null ) { org . apache . ranger . biz . RangerBizUtil . logger . debug ( "Unable<sp>to<sp>find<sp>session." ) ; return null ; } org . apache . ranger . entity . XXPortalUser user = daoManager . getXXPortalUser ( ) . getById ( currentUserSession . getUserId ( ) ) ; if ( user == null ) { org . apache . ranger . biz . RangerBizUtil . logger . debug ( ( "XXPortalUser<sp>not<sp>found<sp>with<sp>logged<sp>in<sp>user<sp>id<sp>:<sp>" + ( currentUserSession . getUserId ( ) ) ) ) ; return null ; } org . apache . ranger . entity . XXUser xUser = daoManager . getXXUser ( ) . findByUserName ( user . getLoginId ( ) ) ; if ( xUser == null ) { org . apache . ranger . biz . RangerBizUtil . logger . debug ( ( ( ( "XXPortalUser<sp>not<sp>found<sp>for<sp>user<sp>id<sp>:" + ( user . getId ( ) ) ) + "<sp>with<sp>name<sp>" ) + ( user . getFirstName ( ) ) ) ) ; return null ; } return xUser . getId ( ) ; }
org . junit . Assert . assertNull ( chk )
testFindBoundaryCases5 ( ) { java . util . regex . Pattern pat = java . util . regex . Pattern . compile ( ".*A.*" ) ; java . util . regex . Matcher mat = pat . matcher ( "\nA\naaa\nA\naaAaa\naaaA\n" ) ; java . lang . String [ ] res = new java . lang . String [ ] { "A" , "A" , "aaAaa" , "aaaA" } ; int k = 0 ; for ( ; mat . find ( ) ; k ++ ) { "<AssertPlaceHolder>" ; } } group ( ) { return group ( 0 ) ; }
org . junit . Assert . assertEquals ( res [ k ] , mat . group ( ) )
whenSaturatedAddTwoIntegerValues_shouldAddThemAndReturnIntMinIfUnderflow ( ) { int result = com . google . common . math . IntMath . saturatedAdd ( Integer . MIN_VALUE , ( - 1000 ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( Integer . MIN_VALUE , result )
flatMapPrecedence ( ) { com . jnape . palatable . lambda . adt . hlist . Tuple2 < java . lang . String , java . lang . Integer > a = com . jnape . palatable . lambda . adt . hlist . HList . tuple ( "foo" , 1 ) ; java . util . function . Function < java . lang . Integer , com . jnape . palatable . lambda . adt . hlist . Tuple2 < java . lang . String , java . lang . Integer > > b = ( x ) -> tuple ( "bar" , ( x + 1 ) ) ; "<AssertPlaceHolder>" ; } flatMap ( java . util . function . Function ) { return new testsupport . EquatableM ( ma . flatMap ( f . andThen ( ( x ) -> x . < EquatableM < testsupport . M , testsupport . B > > coerce ( ) . ma ) ) , equatable ) ; }
org . junit . Assert . assertEquals ( com . jnape . palatable . lambda . adt . hlist . HList . tuple ( "foo" , 2 ) , a . flatMap ( b ) )
testForEnvironment ( ) { hudson . EnvVars environment = new hudson . EnvVars ( ) ; jenkins . plugins . accurev . AccurevTool newTool = accurevTool . forEnvironment ( environment ) ; "<AssertPlaceHolder>" ; } forEnvironment ( hudson . EnvVars ) { return new jenkins . plugins . accurev . AccurevTool ( getName ( ) , environment . expand ( getHome ( ) ) , java . util . Collections . emptyList ( ) ) ; }
org . junit . Assert . assertEquals ( accurevTool . getHome ( ) , newTool . getHome ( ) )
primitives ( ) { buf . append ( true ) . append ( "\n" ) ; buf . append ( ( ( byte ) ( 123 ) ) ) . append ( "\n" ) ; buf . append ( 'c' ) . append ( "\n" ) ; buf . append ( 123.456 ) . append ( "\n" ) ; buf . append ( 123.456F ) . append ( "\n" ) ; buf . append ( 123 ) . append ( "\n" ) ; buf . append ( 123456L ) . append ( "\n" ) ; buf . append ( ( ( short ) ( 123 ) ) ) . append ( "\n" ) ; result += "true\n" ; result += "123\n" ; result += "c\n" ; result += "123.456\n" ; result += "123.456\n" ; result += "123\n" ; result += "123456\n" ; result += "123\n" ; "<AssertPlaceHolder>" ; } toString ( ) { return ( "JspEngine[" + ( path ) ) + "]" ; }
org . junit . Assert . assertEquals ( result , buf . toString ( ) )
semiProtectedTest ( ) { final com . sun . enterprise . config . serverbeans . Applications apps = getHabitat ( ) . getService ( com . sun . enterprise . config . serverbeans . Applications . class ) ; "<AssertPlaceHolder>" ; org . jvnet . hk2 . config . ConfigSupport . apply ( new org . jvnet . hk2 . config . SingleConfigCode < com . sun . enterprise . config . serverbeans . Applications > ( ) { public java . lang . Object run ( com . sun . enterprise . config . serverbeans . Applications param ) throws java . beans . PropertyVetoException , org . jvnet . hk2 . config . TransactionFailure { java . util . List < org . glassfish . api . admin . config . ApplicationName > modules = apps . getModules ( ) ; com . sun . enterprise . config . serverbeans . Application m = param . createChild ( com . sun . enterprise . config . serverbeans . Application . class ) ; modules . add ( m ) ; return m ; } } , apps ) ; } getService ( java . lang . String ) { if ( type == null ) { return null ; } if ( type . equals ( ConnectorConstants . CCP ) ) { return new com . sun . enterprise . connectors . service . ConnectorConnectionPoolAdminServiceImpl ( ) ; } else if ( type . equals ( ConnectorConstants . CR ) ) { return new com . sun . enterprise . connectors . service . ConnectorResourceAdminServiceImpl ( ) ; } else if ( type . equals ( ConnectorConstants . RA ) ) { return new com . sun . enterprise . connectors . service . ResourceAdapterAdminServiceImpl ( ) ; } else if ( type . equals ( ConnectorConstants . SEC ) ) { return new com . sun . enterprise . connectors . service . ConnectorSecurityAdminServiceImpl ( ) ; } else if ( type . equals ( ConnectorConstants . AOR ) ) { return new com . sun . enterprise . connectors . service . ConnectorAdminObjectAdminServiceImpl ( ) ; } else { return null ; } }
org . junit . Assert . assertTrue ( ( apps != null ) )
test08 ( ) { querqy . rewrite . commonrules . model . RulesCollection rules = createRulesFromResource ( "rules-test.txt" , false ) ; querqy . model . Term t1 = new querqy . model . Term ( null , "ts7" ) ; querqy . model . Term t2 = new querqy . model . Term ( null , "ts8" ) ; querqy . model . Term t3 = new querqy . model . Term ( null , "ts" ) ; querqy . rewrite . commonrules . model . PositionSequence < querqy . model . InputSequenceElement > seq = new querqy . rewrite . commonrules . model . PositionSequence ( ) ; seq . nextPosition ( ) ; seq . addElement ( t1 ) ; seq . nextPosition ( ) ; seq . addElement ( t2 ) ; seq . nextPosition ( ) ; seq . addElement ( t3 ) ; java . util . List < querqy . rewrite . commonrules . model . Action > actions = rules . getRewriteActions ( seq ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( ( inputTerms ) == null ) || ( inputTerms . isEmpty ( ) ) ; }
org . junit . Assert . assertTrue ( actions . isEmpty ( ) )
test_ConstructorLorg_eclipse_swt_widgets_ControlII ( ) { org . eclipse . swt . layout . FormAttachment attachment = new org . eclipse . swt . layout . FormAttachment ( shell , 10 , org . eclipse . swt . SWT . LEFT ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( attachment )
testParseScriptFw1 ( ) { java . lang . String path = "" ; try { path = new java . net . URL ( "file:src/test/resources/cfml/fw1.cfc" ) . getPath ( ) ; } catch ( java . net . MalformedURLException e ) { e . printStackTrace ( ) ; } cfml . parsing . cfscript . script . CFScriptStatement scriptStatement = null ; try { scriptStatement = fCfmlParser . parseScriptFile ( path ) ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; org . junit . Assert . fail ( ( "whoops!<sp>" + ( e . getMessage ( ) ) ) ) ; } if ( ( fCfmlParser . getMessages ( ) . size ( ) ) > 0 ) { org . junit . Assert . fail ( ( "whoops!<sp>" + ( fCfmlParser . getMessages ( ) ) ) ) ; } System . out . println ( scriptStatement . toString ( ) ) ; "<AssertPlaceHolder>" ; } toString ( ) { return "" ; }
org . junit . Assert . assertNotNull ( scriptStatement )
testJsonToKey ( ) { java . util . List < com . google . datastore . v1 . Key > keys = org . apache . beam . sdk . transforms . DoFnTester . of ( new com . google . cloud . teleport . templates . common . DatastoreConverters . JsonToKey ( ) ) . processBundle ( entitiesJson ) ; "<AssertPlaceHolder>" ; } of ( com . google . cloud . teleport . values . FailsafeElement ) { return new com . google . cloud . teleport . values . FailsafeElement < > ( other . originalPayload , other . payload ) . setErrorMessage ( other . getErrorMessage ( ) ) . setStacktrace ( other . getStacktrace ( ) ) ; }
org . junit . Assert . assertEquals ( entities . get ( 0 ) . getKey ( ) , keys . get ( 0 ) )
testPositiveClosureSingleRule ( ) { java . lang . String grammar = "grammar<sp>T;\n" + ( ( ( ( ( "options<sp>{output=AST;}\n" + "a<sp>:<sp>b<sp>b<sp>-><sp>b+;\n" ) + "a" 2 ) + "ID<sp>:<sp>\'a\'..\'z\'+<sp>;\n" ) + "INT<sp>:<sp>\'0\'..\'9\'+;\n" ) + "WS<sp>:<sp>(\'<sp>\'|\'\\n\')<sp>{$channel=HIDDEN;}<sp>;\n" ) ; java . lang . String found = execParser ( "a" 1 , grammar , "TParser" , "TLexer" , "a" , "a<sp>b" , debug ) ; "<AssertPlaceHolder>" ; } execParser ( java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , boolean ) { boolean compiled = rawGenerateAndBuildRecognizer ( grammarFileName , grammarStr , parserName , lexerName , debug ) ; org . junit . Assert . assertTrue ( compiled ) ; writeFile ( tmpdir , "input" , input ) ; boolean parserBuildsTrees = ( ( grammarStr . indexOf ( "output=AST" ) ) >= 0 ) || ( ( grammarStr . indexOf ( "output<sp>=<sp>AST" ) ) >= 0 ) ; boolean parserBuildsTemplate = ( ( grammarStr . indexOf ( "output=template" ) ) >= 0 ) || ( ( grammarStr . indexOf ( "output<sp>=<sp>template" ) ) >= 0 ) ; return rawExecRecognizer ( parserName , null , lexerName , startRuleName , null , parserBuildsTrees , parserBuildsTemplate , false , debug ) ; }
org . junit . Assert . assertEquals ( "a" 0 , found )
implicitlyDisabledComponent_detach_componentBecomesEnabled ( ) { com . vaadin . flow . component . HasEnabledTest . TestComponent component = new com . vaadin . flow . component . HasEnabledTest . TestComponent ( ) ; com . vaadin . flow . component . HasEnabledTest . TestComponent parent = new com . vaadin . flow . component . HasEnabledTest . TestComponent ( ) ; parent . add ( component ) ; parent . setEnabled ( false ) ; parent . remove ( component ) ; "<AssertPlaceHolder>" ; } isEnabled ( ) { return getElement ( ) . isEnabled ( ) ; }
org . junit . Assert . assertTrue ( component . isEnabled ( ) )
matchesSerializable ( ) { com . nitorcreations . matchers . SerializableMatcherTest . TestSerializable ts = new com . nitorcreations . matchers . SerializableMatcherTest . TestSerializable ( ) ; ts . setField ( "field" ) ; "<AssertPlaceHolder>" ; } serializable ( ) { return new com . nitorcreations . matchers . SerializableMatcher ( ) ; }
org . junit . Assert . assertThat ( ts , com . nitorcreations . matchers . SerializableMatcher . serializable ( ) )
testToBuilder ( ) { compareDatastoreBackupOptions ( com . google . cloud . bigquery . DatastoreBackupOptionsTest . BACKUP_OPTIONS , com . google . cloud . bigquery . DatastoreBackupOptionsTest . BACKUP_OPTIONS . toBuilder ( ) . build ( ) ) ; java . util . List < java . lang . String > fields = com . google . common . collect . ImmutableList . of ( "field1" , "field2" ) ; com . google . cloud . bigquery . DatastoreBackupOptions backupOptions = com . google . cloud . bigquery . DatastoreBackupOptionsTest . BACKUP_OPTIONS . toBuilder ( ) . setProjectionFields ( fields ) . build ( ) ; "<AssertPlaceHolder>" ; backupOptions = backupOptions . toBuilder ( ) . setProjectionFields ( com . google . cloud . bigquery . DatastoreBackupOptionsTest . PROJECTION_FIELDS ) . build ( ) ; compareDatastoreBackupOptions ( com . google . cloud . bigquery . DatastoreBackupOptionsTest . BACKUP_OPTIONS , backupOptions ) ; } getProjectionFields ( ) { return projectionFields ; }
org . junit . Assert . assertEquals ( fields , backupOptions . getProjectionFields ( ) )
testReleaseOverflow ( ) { io . netty . buffer . AbstractReferenceCountedByteBuf referenceCounted = io . netty . buffer . AbstractReferenceCountedByteBufTest . newReferenceCounted ( ) ; referenceCounted . setRefCnt ( 0 ) ; "<AssertPlaceHolder>" ; referenceCounted . release ( Integer . MAX_VALUE ) ; } refCnt ( ) { return buf . refCnt ( ) ; }
org . junit . Assert . assertEquals ( 0 , referenceCounted . refCnt ( ) )
transitive_proxy_test ( ) { java . util . concurrent . Future < java . util . concurrent . Callable < java . lang . String > > future = remoteExecutor1 . submit ( new org . gridkit . zerormi . RemotingHubTest . RemoteProxyMaker < java . lang . String > ( new org . gridkit . zerormi . RemotingHubTest . Echo < java . lang . String > ( "123" ) ) ) ; java . lang . String result = remoteExecutor2 . submit ( future . get ( ) ) . get ( ) ; "<AssertPlaceHolder>" ; } get ( ) { while ( true ) { try { return get ( 365 , TimeUnit . DAYS ) ; } catch ( java . util . concurrent . TimeoutException e ) { } } }
org . junit . Assert . assertEquals ( "123" , result )
testSplitNull ( ) { final org . eclipse . kapua . client . gateway . Topic topic = org . eclipse . kapua . client . gateway . Topic . split ( null ) ; "<AssertPlaceHolder>" ; } split ( java . lang . String ) { if ( path == null ) { return null ; } path = path . replaceAll ( "(^/+|/$)+" , "" ) ; if ( path . isEmpty ( ) ) { return null ; } return new org . eclipse . kapua . client . gateway . Topic ( java . util . Arrays . asList ( path . split ( "\\/+" ) ) ) ; }
org . junit . Assert . assertNull ( topic )
checkDuplicatedMethods2Test ( ) { java . lang . String code = "class<sp>A{isA<sp>T;}trait<sp>T{isA<sp>T1;isA<sp>T2;}trait<sp>T1{void<sp>test(){/*T1*/}}trait<sp>T2{void<sp>test(){/*T2*/}}" ; cruise . umple . compiler . UmpleModel model = getModel ( code ) ; boolean result = false ; try { model . run ( ) ; } catch ( java . lang . Exception e ) { result = e . getMessage ( ) . contains ( "210" ) ; } finally { "<AssertPlaceHolder>" ; cruise . umple . util . SampleFileWriter . destroy ( "traitTest.ump" ) ; } } contains ( java . lang . Object ) { if ( ( parent ) != null ) { return ( super . contains ( obj ) ) || ( parent . contains ( obj ) ) ; } else { return super . contains ( obj ) ; } }
org . junit . Assert . assertTrue ( result )