input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
largeFile ( ) { this . waitForQueueDrainAndRefreshIndex ( ) ; byte [ ] data = org . apache . commons . io . IOUtils . toByteArray ( this . getClass ( ) . getResourceAsStream ( "/file-bigger-than-5M" ) ) ; org . glassfish . jersey . media . multipart . FormDataMultiPart form = new org . glassfish . jersey . media . mult... | org . junit . Assert . assertEquals ( data . length , foundData . length ) |
add_partition ( ) { org . apache . hadoop . hive . metastore . api . Partition newPartition = new org . apache . hadoop . hive . metastore . api . Partition ( ) ; newPartition . setDbName ( com . hotels . bdp . waggledance . server . FederatedHMSHandlerTest . DB_P ) ; org . apache . hadoop . hive . metastore . api . Pa... | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( outbound ) ) |
testCreateFromStreamNotExists ( ) { initializeExpectedBucket ( 5 ) ; com . google . cloud . storage . BlobInfo info = com . google . cloud . storage . BlobInfo . newBuilder ( com . google . cloud . storage . BlobId . of ( "b" , "n" , 0L ) ) . setContentType ( com . google . cloud . storage . BucketTest . CONTENT_TYPE )... | org . junit . Assert . assertEquals ( expectedBlob , blob ) |
testClear ( ) { com . google . zxing . common . BitArray array = new com . google . zxing . common . BitArray ( 32 ) ; for ( int i = 0 ; i < 32 ; i ++ ) { array . set ( i ) ; } array . clear ( ) ; for ( int i = 0 ; i < 32 ; i ++ ) { "<AssertPlaceHolder>" ; } } get ( int ) { return ( ( bits [ ( i / 32 ) ] ) & ( 1 << ( i... | org . junit . Assert . assertFalse ( array . get ( i ) ) |
testReadDouble ( ) { org . apache . qpid . jms . message . JmsBytesMessage msg = factory . createBytesMessage ( ) ; msg . writeDouble ( 3.3 ) ; msg . reset ( ) ; "<AssertPlaceHolder>" ; } readDouble ( ) { initializeReading ( ) ; try { return this . dataIn . readDouble ( ) ; } catch ( java . io . EOFException e ) { thro... | org . junit . Assert . assertTrue ( ( ( msg . readDouble ( ) ) == 3.3 ) ) |
testCreatePullsFromGettersRetrieveNothingFromEmptyObject ( ) { org . uma . jmetal . util . measure . impl . MeasureFactory factory = new org . uma . jmetal . util . measure . impl . MeasureFactory ( ) ; java . util . Map < java . lang . String , org . uma . jmetal . util . measure . PullMeasure < ? > > measures = facto... | org . junit . Assert . assertTrue ( measures . toString ( ) , measures . isEmpty ( ) ) |
testConstExprChooseFirstResult ( ) { java . util . List < io . cloudslang . lang . entities . bindings . Result > results = asList ( createResult ( ScoreLangConstants . SUCCESS_RESULT , io . cloudslang . lang . entities . bindings . values . ValueFactory . create ( "${<sp>1==1<sp>}" ) ) , createResult ( ScoreLangConsta... | org . junit . Assert . assertEquals ( ScoreLangConstants . SUCCESS_RESULT , result ) |
testUploadValidModelWithAlienFile ( ) { java . lang . String fileName = "sample_models/valid-models-with-alien-file.zip" ; java . util . List < org . eclipse . vorto . repository . importer . ValidationReport > uploadResults = bulkUploadHelper . uploadMultiple ( loadContentForFile ( fileName ) , fileName , org . eclips... | org . junit . Assert . assertEquals ( 3 , uploadResults . size ( ) ) |
testGetLibraryDilutionByBarcodeNone ( ) { final uk . ac . bbsrc . tgac . miso . core . data . impl . LibraryDilution ld = dao . getByBarcode ( "nonexistant<sp>barcode" ) ; "<AssertPlaceHolder>" ; } getByBarcode ( java . lang . String ) { org . hibernate . Criteria criteria = currentSession ( ) . createCriteria ( uk . a... | org . junit . Assert . assertNull ( ld ) |
rfc6238TestVectorsSHA512 ( ) { final java . lang . String rfc6238TestKey = "3132333435363738393031323334353637383930" + ( ( "3132333435363738393031323334353637383930" + "3132333435363738393031323334353637383930" ) + "31323334" ) ; final byte [ ] key = com . warrenstrange . googleauth . GoogleAuthTest . hexStr2Bytes ( r... | org . junit . Assert . assertEquals ( ga . calculateCode ( key , ( ( testTime [ i ] ) / timeStepSizeInSeconds ) ) , testResults [ i ] ) |
testGetOrThrowNewExceptionWithoutException ( ) { int value = com . annimon . stream . Exceptional . of ( com . annimon . stream . ExceptionalTest . tenSupplier ) . getOrThrow ( new java . lang . ArithmeticException ( ) ) ; "<AssertPlaceHolder>" ; } getOrThrow ( E extends com . annimon . stream . Throwable ) { if ( ( th... | org . junit . Assert . assertEquals ( 10 , value ) |
testHandleCallMove ( ) { org . eclipse . rap . rwt . testfixture . internal . Fixture . fakePhase ( PhaseId . PROCESS_ACTION ) ; org . eclipse . swt . widgets . CoolItem item1 = new org . eclipse . swt . widgets . CoolItem ( coolBar , org . eclipse . swt . SWT . NONE ) ; item1 . setSize ( 20 , 10 ) ; int oldX = item . ... | org . junit . Assert . assertTrue ( ( oldX != ( item . getBounds ( ) . x ) ) ) |
testAge ( ) { org . apache . olingo . odata2 . ref . model . Employee employee1 = new org . apache . olingo . odata2 . ref . model . Employee ( 1 , null ) ; employee1 . setAge ( org . apache . olingo . odata2 . ref . model . EmployeeTest . VALUE_AGE ) ; "<AssertPlaceHolder>" ; } getAge ( ) { return age ; } | org . junit . Assert . assertEquals ( org . apache . olingo . odata2 . ref . model . EmployeeTest . VALUE_AGE , employee1 . getAge ( ) ) |
testToString ( ) { nl . moderniseringgba . migratie . conversie . model . brp . groep . BrpGeslachtsnaamcomponentInhoud inhoud1 = new nl . moderniseringgba . migratie . conversie . model . brp . groep . BrpGeslachtsnaamcomponentInhoud ( "van" , '<sp>' , "HorenZeggen" , null , new nl . moderniseringgba . migratie . conv... | org . junit . Assert . assertEquals ( inhoud1 . toString ( ) , inhoud2 . toString ( ) ) |
testMassMethod ( ) { org . apache . cxf . tools . common . dom . ExtendedDocumentBuilder builder = new org . apache . cxf . tools . common . dom . ExtendedDocumentBuilder ( ) ; builder . setValidating ( false ) ; java . lang . String tsSource = "/org/apache/cxf/tools/common/toolspec/parser/resources/testtool.xml" ; "<A... | org . junit . Assert . assertNotNull ( builder . parse ( getClass ( ) . getResourceAsStream ( tsSource ) ) ) |
testScaleWithFull ( ) { java . awt . image . BufferedImage inImage = edu . illinois . library . cantaloupe . processor . Java2DUtilTest . newColorImage ( 100 , 100 , 8 , false ) ; edu . illinois . library . cantaloupe . operation . Scale scale = new edu . illinois . library . cantaloupe . operation . Scale ( ) ; scale ... | org . junit . Assert . assertSame ( inImage , outImage ) |
deserializationTest ( ) { com . fasterxml . jackson . core . JsonParser jsonParser = mock ( com . fasterxml . jackson . core . JsonParser . class ) ; when ( jsonParser . getText ( ) ) . thenReturn ( "2014-05-12<sp>12:32:32" ) ; com . intuit . wasabi . api . jackson . SQLTimestampDeserializer deserializer = new com . in... | org . junit . Assert . assertEquals ( ts , java . sql . Timestamp . valueOf ( "2014-05-12<sp>12:32:32" ) ) |
testAuthSuccess ( ) { com . blade . mvc . http . Request mockRequest = mockHttpRequest ( "GET" ) ; com . blade . mvc . WebContext . init ( com . blade . Blade . of ( ) , "/" ) ; java . util . Map < java . lang . String , java . lang . String > headers = new java . util . HashMap ( ) ; headers . put ( "Authorization" , ... | org . junit . Assert . assertTrue ( flag ) |
testGetAtomContainerCount ( ) { org . openscience . cdk . smiles . SmilesParser sp = new org . openscience . cdk . smiles . SmilesParser ( org . openscience . cdk . DefaultChemObjectBuilder . getInstance ( ) ) ; org . openscience . cdk . interfaces . IAtomContainer molecule = sp . parseSmiles ( "c1ccccc1" ) ; org . ope... | org . junit . Assert . assertEquals ( 1 , ringSet . getAtomContainerCount ( ) ) |
testNewKapuaTdesignate ( ) { org . eclipse . kapua . commons . configuration . metatype . KapuaMetatypeFactoryImpl factory = new org . eclipse . kapua . commons . configuration . metatype . KapuaMetatypeFactoryImpl ( ) ; "<AssertPlaceHolder>" ; } newKapuaTdesignate ( ) { return factory . newKapuaTdesignate ( ) ; } | org . junit . Assert . assertNotNull ( factory . newKapuaTdesignate ( ) ) |
testGetValue_PrimaryValid ( ) { when ( primary . getValue ( row ) ) . thenReturn ( io . lumify . mapping . column . FallbackColumnValueTest . PRIMARY_VAL ) ; when ( fallbackIf . matches ( io . lumify . mapping . column . FallbackColumnValueTest . PRIMARY_VAL ) ) . thenReturn ( false ) ; "<AssertPlaceHolder>" ; } getVal... | org . junit . Assert . assertEquals ( io . lumify . mapping . column . FallbackColumnValueTest . PRIMARY_VAL , instance . getValue ( row ) ) |
testTransform ( ) { java . util . List < java . lang . String > fromList = new java . util . LinkedList ( ) ; fromList . add ( "1" ) ; fromList . add ( "2" ) ; fromList . add ( "3" ) ; fromList . add ( "4" ) ; java . util . List < java . lang . Integer > toList = org . jupiter . common . util . Lists . transform ( from... | org . junit . Assert . assertTrue ( ( ( toList . size ( ) ) == ( fromList . size ( ) ) ) ) |
testKindMetNationaliteitEnZonderIndicatieStaatsloos ( ) { final java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > berichtEntiteiten = bral0219 . voerRegelUit ( maakFamilie ( SoortIndicatie . INDICATIE_DERDE_HEEFT_GEZAG , nl . bzk . brp . bijhouding . business . regels . impl . gegevenset . persoon... | org . junit . Assert . assertEquals ( 0 , berichtEntiteiten . size ( ) ) |
shouldBuild ( ) { net . ripe . rpki . commons . provisioning . x509 . ProvisioningCmsCertificate cmsCertificate = subject . build ( ) ; "<AssertPlaceHolder>" ; } build ( ) { return new net . ripe . rpki . commons . xml . XStreamXmlSerializer < T > ( xStream , objectType ) ; } | org . junit . Assert . assertNotNull ( cmsCertificate ) |
testConvertWithParametersAndDisabledDeefaultConstaints ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; java . lang . String topic = "topic" ; java . lang . String content = "content" ; org . lnu . is . domain . broadcasting . BroadcastingMessage context = new org . lnu . is . domain . broadcasting . B... | org . junit . Assert . assertEquals ( expected , actualQuery ) |
testPasswordAliasOption ( ) { org . apache . sqoop . util . password . CredentialProviderPasswordLoader pl = new org . apache . sqoop . util . password . CredentialProviderPasswordLoader ( ) ; if ( ! ( org . apache . sqoop . util . password . CredentialProviderHelper . isProviderAvailable ( ) ) ) { org . apache . sqoop... | org . junit . Assert . assertEquals ( pw , out . getPassword ( ) ) |
shouldParseWriteAbort ( ) { java . lang . String scriptFragment = "write<sp>abort" ; org . kaazing . k3po . lang . internal . parser . ScriptParserImpl parser = new org . kaazing . k3po . lang . internal . parser . ScriptParserImpl ( ) ; org . kaazing . k3po . lang . internal . ast . AstWriteAbortNode actual = parser .... | org . junit . Assert . assertEquals ( expected , actual ) |
getMaxNextCount_mixedTest ( ) { datawave . query . predicate . EventDataQueryFilter mockFilter1 = org . easymock . EasyMock . createMock ( datawave . query . predicate . EventDataQueryFilter . class ) ; datawave . query . predicate . EventDataQueryFilter mockFilter2 = org . easymock . EasyMock . createMock ( datawave .... | org . junit . Assert . assertTrue ( ( result == 8 ) ) |
testGetFieldAs ( ) { message . addField ( "fields" , com . google . common . collect . Lists . newArrayList ( "hello" ) ) ; "<AssertPlaceHolder>" ; } getFieldAs ( java . lang . Class , java . lang . String ) { return T . cast ( getField ( key ) ) ; } | org . junit . Assert . assertEquals ( com . google . common . collect . Lists . newArrayList ( "hello" ) , message . getFieldAs ( java . util . List . class , "fields" ) ) |
testRunningAway ( ) { net . sf . extjwnl . dictionary . IndexWord iw = net . sf . extjwnl . dictionary . DictionaryReadTester . dictionary . lookupIndexWord ( POS . VERB , "running-away" ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( iw ) |
testGetPropertiesFolder ( ) { classUnderTest . setPropertiesFolder ( "aTestString" ) ; "<AssertPlaceHolder>" ; } getPropertiesFolder ( ) { return propertiesFolder ; } | org . junit . Assert . assertEquals ( "aTestString" , classUnderTest . getPropertiesFolder ( ) ) |
appendCustomSeparatorLine ( ) { org . geotools . swing . dialog . JTextReporter . Connection conn = showDialog ( org . geotools . swing . dialog . JTextReporterTest . TITLE , ( ( org . geotools . swing . dialog . JTextReporterTest . TEXT [ 0 ] ) + "\n" ) ) . get ( ) ; final int N = 10 ; final char c = '#' ; conn . appe... | org . junit . Assert . assertEquals ( expected , displayedText ) |
mergeContentMetadata ( ) { java . util . ArrayList < com . sonatype . nexus . p2 . metadata . Content > repos = loadContentMetadata ( new java . lang . String [ ] { "metadata/merge/content1.xml" , "metadata/merge/content2.xml" } ) ; com . sonatype . nexus . p2 . metadata . ArtifactsMerge m = new com . sonatype . nexus ... | org . junit . Assert . assertEquals ( 7 , merged . getUnits ( ) . size ( ) ) |
testBerichtleegZonderMetWarnings ( ) { nl . bzk . brp . business . dto . bijhouding . AbstractBijhoudingsBericht bericht = new nl . bzk . brp . business . dto . bijhouding . VerhuizingBericht ( ) ; nl . bzk . brp . business . dto . BerichtContext context = new nl . bzk . brp . business . dto . BerichtContext ( new nl .... | org . junit . Assert . assertEquals ( false , resultaat . bevatVerwerkingStoppendeFouten ( ) ) |
test_factoryMustUseClassCache ( ) { org . torpedoquery . jpa . internal . utils . ProxyFactoryFactory proxyFactoryFactory = org . torpedoquery . jpa . internal . TorpedoMagic . getProxyfactoryfactory ( ) ; org . torpedoquery . jpa . internal . utils . TorpedoMethodHandler torpedoMethodHandler = new org . torpedoquery .... | org . junit . Assert . assertSame ( createProxy . getClass ( ) , createProxy2 . getClass ( ) ) |
testLoadConfigWithConfigNotFound ( ) { java . lang . String someAppId = "1" ; java . lang . String someClusterName = "someClusterName" ; java . lang . String someNamespaceName = "someNamespaceName" ; when ( releaseRepository . findFirstByAppIdAndClusterNameAndNamespaceNameAndIsAbandonedFalseOrderByIdDesc ( someAppId , ... | org . junit . Assert . assertNull ( result ) |
testShouldFireSyncEvent ( ) { java . util . concurrent . atomic . AtomicInteger counter = com . liferay . document . library . app . service . test . DLAppServiceTestUtil . registerDLSyncEventProcessorMessageListener ( DLSyncConstants . EVENT_UPDATE ) ; com . liferay . portal . kernel . repository . model . FileEntry f... | org . junit . Assert . assertEquals ( 2 , counter . get ( ) ) |
whenValidDomainObjectWithNatureInmemoryEntityImplementingRecreatableDomainObject ( ) { @ org . apache . isis . applib . annotation . DomainObject ( nature = org . apache . isis . applib . annotation . Nature . INMEMORY_ENTITY ) class ValidDomainObjectWithNatureInmemoryEntityImplementingRecreatableDomainObject implement... | org . junit . Assert . assertThat ( validationFailures . getNumberOfMessages ( ) , org . hamcrest . CoreMatchers . is ( 0 ) ) |
shouldCountCustomMethodForNot ( ) { java . lang . String documentId = randomNumeric ( 5 ) ; org . springframework . data . elasticsearch . entities . SampleEntity sampleEntity = new org . springframework . data . elasticsearch . entities . SampleEntity ( ) ; sampleEntity . setId ( documentId ) ; sampleEntity . setType ... | org . junit . Assert . assertThat ( count , is ( equalTo ( 1L ) ) ) |
testBug60374 ( ) { org . apache . poi . poifs . filesystem . POIFSFileSystem fs = new org . apache . poi . poifs . filesystem . POIFSFileSystem ( org . apache . poi . hwpf . extractor . TestWordExtractorBugs . SAMPLES . openResourceAsStream ( "cn.orthodox.www_divenbog_APRIL_30-APRIL.DOC" ) ) ; final org . apache . poi ... | org . junit . Assert . assertNotNull ( extractor . getText ( ) ) |
testSingleNodeTree ( ) { org . antlr . runtime . tree . TreeWizard wiz = new org . antlr . runtime . tree . TreeWizard ( org . antlr . test . TestTreeWizard . adaptor , org . antlr . test . TestTreeWizard . tokens ) ; org . antlr . runtime . tree . CommonTree t = ( ( org . antlr . runtime . tree . CommonTree ) ( wiz . ... | org . junit . Assert . assertEquals ( expecting , found ) |
givenMap_whenSortingByValues_thenSortedMap ( ) { java . lang . String [ ] sortedValues = new java . lang . String [ ] { "Apple" , "Earl" , "George" , "John" , "Pearl" , "Rocky" } ; org . baeldung . java . sorting . List < Map . Entry < java . lang . Integer , java . lang . String > > entries = new org . baeldung . java... | org . junit . Assert . assertTrue ( org . baeldung . java . sorting . Arrays . equals ( sortedMap . values ( ) . toArray ( ) , sortedValues ) ) |
testSetGetConf ( ) { final org . apache . hadoop . conf . Configuration configuration = new org . apache . hadoop . conf . Configuration ( ) ; isinPartitioner . setConf ( configuration ) ; "<AssertPlaceHolder>" ; } getConf ( ) { return conf ; } | org . junit . Assert . assertSame ( configuration , isinPartitioner . getConf ( ) ) |
testFileURI ( ) { org . apache . taverna . scufl2 . api . activity . Activity a = new org . apache . taverna . scufl2 . api . activity . Activity ( ) ; java . net . URI type = new java . net . URI ( "file:///fred/soup" ) ; a . setType ( type ) ; org . apache . taverna . scufl2 . validation . correctness . CorrectnessVa... | org . junit . Assert . assertTrue ( problem ) |
whenEmptyOptional_thenGetValueFromOr ( ) { com . stackify . optional . User result = java . util . Optional . ofNullable ( user ) . or ( ( ) -> java . util . Optional . of ( new com . stackify . optional . User ( "default" , "1234" ) ) ) . get ( ) ; "<AssertPlaceHolder>" ; } getEmail ( ) { return email ; } | org . junit . Assert . assertEquals ( result . getEmail ( ) , "default" ) |
testValidateUrl_IPV6_5 ( ) { boolean result = org . oscm . validator . ADMValidator . isUrl ( "http://[fd00:0:a:8c::12:93]:8180/oscm-portal" ) ; "<AssertPlaceHolder>" ; } isUrl ( java . lang . String ) { return org . oscm . validator . ADMValidator . URL_VALIDATOR . isValid ( value ) ; } | org . junit . Assert . assertTrue ( result ) |
testGetDataPropertyValues ( ) { org . semanticweb . owlapi . model . OWLDatatype type = df . getIntegerOWLDatatype ( ) ; org . semanticweb . owlapi . model . OWLLiteral lit1 = df . getOWLLiteral ( "01" , type ) ; org . semanticweb . owlapi . model . OWLLiteral lit2 = df . getOWLLiteral ( "1" , type ) ; "<AssertPlaceHol... | org . junit . Assert . assertFalse ( lit1 . equals ( lit2 ) ) |
checkTestFoldContent ( ) { final int numExamples = 42 ; final int numFeatures = 3 ; org . nd4j . linalg . api . ndarray . INDArray features = org . nd4j . linalg . factory . Nd4j . rand ( new int [ ] { numExamples , numFeatures } ) ; org . nd4j . linalg . api . ndarray . INDArray labels = org . nd4j . linalg . factory ... | org . junit . Assert . assertEquals ( numExamples , testLabels . size ( ) ) |
testNormalizedNodeContainer ( ) { final org . opendaylight . yangtools . yang . data . api . schema . ContainerNode data = org . mockito . Mockito . mock ( org . opendaylight . yangtools . yang . data . api . schema . ContainerNode . class ) ; final org . opendaylight . yangtools . yang . data . api . schema . tree . s... | org . junit . Assert . assertTrue ( ( node instanceof org . opendaylight . yangtools . yang . data . api . schema . tree . spi . SimpleContainerNode ) ) |
shouldRejectInvalidIPv6Address ( ) { node . setAddress ( "2001:0db8:85a3:0000:0000:8a2e:0370:7334:::" ) ; org . openstack . atlas . api . validation . results . ValidatorResult result = validator . validate ( node , org . openstack . atlas . api . validation . validators . POST ) ; "<AssertPlaceHolder>" ; } passedValid... | org . junit . Assert . assertTrue ( result . passedValidation ( ) ) |
testAuthUserReadOnlyPatch ( ) { setupAuthUserReadOnly ( ) ; request . setMethod ( "PATCH" ) ; webacFilter . doFilter ( request , response , filterChain ) ; "<AssertPlaceHolder>" ; } doFilter ( javax . servlet . ServletRequest , javax . servlet . ServletResponse , javax . servlet . FilterChain ) { final org . apache . s... | org . junit . Assert . assertEquals ( javax . servlet . http . HttpServletResponse . SC_FORBIDDEN , response . getStatus ( ) ) |
testCompiledCodeDirectories_withFake ( ) { org . pitest . aggregate . ReportAggregator . Builder builder = org . pitest . aggregate . ReportAggregator . builder ( ) . compiledCodeDirectories ( java . util . Arrays . asList ( new java . io . File ( "fakedirectory" ) ) ) ; "<AssertPlaceHolder>" ; } getCompiledCodeDirecto... | org . junit . Assert . assertTrue ( builder . getCompiledCodeDirectories ( ) . isEmpty ( ) ) |
testDivideUnitOfQ ( ) { javax . measure . Unit < ? > result = one . divide ( one ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( result , one ) |
removeLimitedMapValueInMap ( ) { java . lang . Object expectedValue = new java . lang . Object ( ) ; limitedMap . put ( expectedValue , expectedValue ) ; java . lang . Object actualValue = limitedMap . remove ( expectedValue ) ; "<AssertPlaceHolder>" ; verify ( evictionListener ) . onEviction ( expectedValue , expected... | org . junit . Assert . assertEquals ( expectedValue , actualValue ) |
testSerialization ( ) { org . jfree . chart . renderer . category . GroupedStackedBarRenderer r1 = new org . jfree . chart . renderer . category . GroupedStackedBarRenderer ( ) ; org . jfree . chart . renderer . category . GroupedStackedBarRenderer r2 = ( ( org . jfree . chart . renderer . category . GroupedStackedBarR... | org . junit . Assert . assertEquals ( r1 , r2 ) |
testEcho ( ) { byte [ ] bytes = org . apache . cxf . systest . mtom_feature . ImageHelper . getImageBytes ( getImage ( "/java.jpg" ) , "image/jpeg" ) ; javax . xml . ws . Holder < byte [ ] > image = new javax . xml . ws . Holder ( bytes ) ; port . echoData ( image ) ; "<AssertPlaceHolder>" ; } echoData ( javax . xml . ... | org . junit . Assert . assertNotNull ( image ) |
withHost ( ) { final com . azure . common . implementation . http . UrlBuilder builder = new com . azure . common . implementation . http . UrlBuilder ( ) . withHost ( "www.example.com" ) ; "<AssertPlaceHolder>" ; } toString ( ) { return this . value ; } | org . junit . Assert . assertEquals ( "www.example.com" , builder . toString ( ) ) |
testTextBounds ( ) { org . eclipse . swt . widgets . TableItem item = new org . eclipse . swt . widgets . TableItem ( table , org . eclipse . swt . SWT . NONE ) ; org . eclipse . swt . widgets . TableColumn column1 = new org . eclipse . swt . widgets . TableColumn ( table , org . eclipse . swt . SWT . NONE ) ; column1 ... | org . junit . Assert . assertTrue ( ( ( ( textBounds1 . x ) + ( textBounds1 . width ) ) <= ( textBounds2 . x ) ) ) |
testEquals ( ) { org . jfree . data . time . Quarter q1 = new org . jfree . data . time . Quarter ( 2 , 2002 ) ; org . jfree . data . time . Quarter q2 = new org . jfree . data . time . Quarter ( 2 , 2002 ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == o ) { return true ; } if ( ! ( o i... | org . junit . Assert . assertTrue ( q1 . equals ( q2 ) ) |
testValidUri2 ( ) { connectionUri = "postgresql://myhost" ; actualConfiguration = io . reactiverse . pgclient . PgConnectOptions . fromUri ( connectionUri ) ; expectedConfiguration = new io . reactiverse . pgclient . PgConnectOptions ( ) . setHost ( "myhost" ) ; "<AssertPlaceHolder>" ; } setHost ( java . lang . String ... | org . junit . Assert . assertEquals ( expectedConfiguration , actualConfiguration ) |
testToBigDecimalFromString ( ) { java . lang . Object result = com . orientechnologies . orient . core . metadata . schema . OType . convert ( "10.65" , java . math . BigDecimal . class ) ; "<AssertPlaceHolder>" ; } convert ( java . lang . Object , java . lang . Class ) { if ( iValue == null ) return null ; if ( iTarge... | org . junit . Assert . assertEquals ( result , new java . math . BigDecimal ( "10.65" ) ) |
testGetKitDescriptorByPartNumberNotFound ( ) { uk . ac . bbsrc . tgac . miso . core . data . impl . kit . KitDescriptor kitDescriptor = dao . getKitDescriptorByPartNumber ( "doesnotexist" ) ; "<AssertPlaceHolder>" ; } getKitDescriptorByPartNumber ( java . lang . String ) { org . hibernate . Criteria criteria = currentS... | org . junit . Assert . assertNull ( kitDescriptor ) |
testDeleteFullCache ( ) { java . util . concurrent . atomic . AtomicInteger deletedFiles = new java . util . concurrent . atomic . AtomicInteger ( 0 ) ; java . util . concurrent . atomic . AtomicInteger deletedDirs = new java . util . concurrent . atomic . AtomicInteger ( 0 ) ; deletePaths ( buildStatusList ( ) , delet... | org . junit . Assert . assertEquals ( 0 , deletedFiles . get ( ) ) |
get ( ) { com . gs . collections . api . list . primitive . ImmutableBooleanList list = this . classUnderTest ( ) ; for ( int i = 0 ; i < ( list . size ( ) ) ; i ++ ) { "<AssertPlaceHolder>" ; } } get ( int ) { return this . delegate . get ( index ) ; } | org . junit . Assert . assertEquals ( ( ( i & 1 ) == 0 ) , list . get ( i ) ) |
testSilentFinish ( ) { org . openide . windows . IOFoldingTest . InputOutputWithFolding io = new org . openide . windows . IOFoldingTest . InputOutputWithFolding ( ) ; org . openide . windows . FoldHandle fold1 = org . openide . windows . IOFolding . startFold ( io , true ) ; org . openide . windows . FoldHandle fold2 ... | org . junit . Assert . assertTrue ( fold2 . isFinished ( ) ) |
defaultTest1 ( ) { final com . zaxxer . hikari . HikariConfig config = new com . zaxxer . hikari . HikariConfig ( ) ; config . setDataSourceClassName ( com . navercorp . pinpoint . plugin . jdk7 . hikaricp . HikariCpIT . DATA_SOURCE_CLASS_NAME ) ; config . addDataSourceProperty ( "url" , com . navercorp . pinpoint . pl... | org . junit . Assert . assertNotNull ( connection ) |
testTestBitNegative2 ( ) { byte [ ] aBytes = new byte [ ] { - 1 , - 128 , 56 , 100 , - 2 , - 76 , 89 , 45 , 91 , 3 , - 15 , 35 , 26 } ; int aSign = - 1 ; int number = 45 ; java . math . BigInteger aNumber = new java . math . BigInteger ( aSign , aBytes ) ; "<AssertPlaceHolder>" ; } testBit ( int ) { if ( n == 0 ) { ret... | org . junit . Assert . assertTrue ( ( ! ( aNumber . testBit ( number ) ) ) ) |
testDeleteBtUUID ( ) { org . apache . eagle . metadata . model . SiteEntity siteEntity = new org . apache . eagle . metadata . model . SiteEntity ( ) ; siteEntity . setSiteId ( "testsiteid" ) ; siteEntity . setSiteName ( "testsitename" ) ; siteEntity . setDescription ( "testdesc" ) ; org . apache . eagle . metadata . m... | org . junit . Assert . assertEquals ( resultEntity , entity ) |
testCreateAndReadFile ( ) { byte [ ] bytes = "testData" . getBytes ( StandardCharsets . UTF_8 ) ; create ( "testFile" , bytes ) ; "<AssertPlaceHolder>" ; } read ( java . lang . String , long ) { try ( java . nio . channels . ReadableByteChannel channel = fileSystem . open ( testPath ( relativePath ) ) ) { java . io . I... | org . junit . Assert . assertArrayEquals ( bytes , read ( "testFile" , 0 ) ) |
testOverrideValue ( ) { io . bootique . BQRuntime runtime = app ( ) . var ( "MY_VAR" , "myValue" ) . declareVar ( "testOverrideValue.c.m.l" , "MY_VAR" ) . createRuntime ( ) ; io . bootique . Bootique_Configuration_VarsIT . Bean1 b1 = runtime . getInstance ( io . bootique . config . ConfigurationFactory . class ) . conf... | org . junit . Assert . assertEquals ( "myValue" , b1 . c . m . l ) |
testSend ( ) { final net . violet . platform . api . actions . Action theAction = new net . violet . platform . api . actions . messages . SendMessage ( ) ; final net . violet . platform . datamodel . Application theApplication = new net . violet . platform . datamodel . mock . ApplicationMock ( 12 , "My<sp>first<sp>ap... | org . junit . Assert . assertNull ( theResult ) |
testEqualsNull ( ) { java . lang . String a = "92948782094488478231212478987482988429808779810457634781384756794987" ; int aScale = - 24 ; java . math . BigDecimal aNumber = new java . math . BigDecimal ( new java . math . BigInteger ( a ) , aScale ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ! ... | org . junit . Assert . assertFalse ( aNumber . equals ( null ) ) |
testNoMatch09 ( ) { boolean matchResult = resultNamePatternMatcher . matchesEndToEnd ( "_69A-" ) ; "<AssertPlaceHolder>" ; } matchesEndToEnd ( java . lang . String ) { return pattern . matcher ( input ) . matches ( ) ; } | org . junit . Assert . assertFalse ( matchResult ) |
testInt8Array ( ) { com . eclipsesource . v8 . V8Value result = ( ( com . eclipsesource . v8 . V8Value ) ( v8 . executeScript ( "var<sp>ints<sp>=<sp>new<sp>Int8Array();<sp>ints" ) ) ) ; "<AssertPlaceHolder>" ; result . close ( ) ; } executeScript ( java . lang . String ) { return executeScript ( script , null , 0 ) ; } | org . junit . Assert . assertNotNull ( result ) |
testFindTemplateSource ( ) { java . lang . Object source = createTemplateSource ( ) ; "<AssertPlaceHolder>" ; } createTemplateSource ( ) { com . ewcms . publication . service . TemplatePublishServiceable service = mock ( com . ewcms . publication . service . TemplatePublishServiceable . class ) ; com . ewcms . core . s... | org . junit . Assert . assertNotNull ( source ) |
testComment ( ) { java . lang . String output = getClientOutput ( com . j256 . simplejmx . client . CommandLineJmxClientTest . client , "#" ) ; "<AssertPlaceHolder>" ; } getClientOutput ( com . j256 . simplejmx . client . CommandLineJmxClient , java . lang . String ) { return getClientOutput ( client , new java . lang ... | org . junit . Assert . assertEquals ( "" , output ) |
testSerializeWithHash ( ) { com . nextdoor . bender . ipc . es . ElasticSearchTransportSerializer serializer = new com . nextdoor . bender . ipc . es . ElasticSearchTransportSerializer ( true , "event" , "log" , false , "_routing" ) ; com . nextdoor . bender . InternalEvent record = new com . nextdoor . bender . ipc . ... | org . junit . Assert . assertEquals ( expected , actual ) |
testFinal ( ) { com . yahoo . hive . udf . funnel . Funnel udaf = new com . yahoo . hive . udf . funnel . Funnel ( ) ; org . apache . hadoop . hive . serde2 . objectinspector . ObjectInspector [ ] inputObjectInspectorList = new org . apache . hadoop . hive . serde2 . objectinspector . ObjectInspector [ ] { org . apache... | org . junit . Assert . assertEquals ( expected , result ) |
toXml ( ) { cruise . umple . compiler . UmletElement class1 = c . newClass ( "Mentor" ) ; cruise . umple . compiler . UmletElement class2 = c . newClass ( "Mentor" ) ; cruise . umple . compiler . UmletElement association = c . newAssociation ( class1 , class2 , "0..*" , "0..1" , "mentor" , "student" ) ; cruise . umple ... | org . junit . Assert . assertEquals ( expected , actual ) |
testExtractPathFromHttpUrl ( ) { final java . net . URL url = new java . net . URL ( "http://java.sun.com/index.html#chapter1" ) ; final java . lang . String expected = "/index.html" ; "<AssertPlaceHolder>" ; } extractPath ( java . net . URL ) { java . lang . String urlPath = url . getPath ( ) ; if ( urlPath . startsWi... | org . junit . Assert . assertEquals ( expected , new org . apache . logging . log4j . core . config . plugins . util . ResolverUtil ( ) . extractPath ( url ) ) |
shouldCheckGetCustomerByIdURI ( ) { javax . ws . rs . core . Response response = org . agoncal . book . javaee7 . chapter15 . ex07 . CustomerRestService07IT . client . target ( "http://localhost:8282/07/customer/1234" ) . request ( ) . get ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 200 , response . getStatus ( ) ) |
testBuildImage_insecureRegistryException ( ) { com . google . cloud . tools . jib . registry . InsecureRegistryException mockInsecureRegistryException = org . mockito . Mockito . mock ( com . google . cloud . tools . jib . registry . InsecureRegistryException . class ) ; org . mockito . Mockito . doThrow ( mockInsecure... | org . junit . Assert . assertEquals ( com . google . cloud . tools . jib . plugins . common . BuildStepsRunnerTest . TEST_HELPFUL_SUGGESTIONS . forInsecureRegistry ( ) , ex . getMessage ( ) ) |
testPut_VoidValue_CharArrayNodeFactory ( ) { com . googlecode . concurrenttrees . radix . ConcurrentRadixTree < com . googlecode . concurrenttrees . radix . node . concrete . voidvalue . VoidValue > tree = new com . googlecode . concurrenttrees . radix . ConcurrentRadixTree < com . googlecode . concurrenttrees . radix ... | org . junit . Assert . assertEquals ( expected , actual ) |
testCompareId_List ( ) { java . util . List < org . hl7 . v3 . PRPAMT201306UV02LivingSubjectId > localSubjectIds = new java . util . ArrayList ( ) ; org . hl7 . v3 . PRPAMT201306UV02LivingSubjectId localSubjectId = new org . hl7 . v3 . PRPAMT201306UV02LivingSubjectId ( ) ; org . hl7 . v3 . II localId = new org . hl7 . ... | org . junit . Assert . assertTrue ( result ) |
testSerialization ( ) { org . jfree . chart . needle . ShipNeedle n1 = new org . jfree . chart . needle . ShipNeedle ( ) ; org . jfree . chart . needle . ShipNeedle n2 = ( ( org . jfree . chart . needle . ShipNeedle ) ( org . jfree . chart . TestUtilities . serialised ( n1 ) ) ) ; "<AssertPlaceHolder>" ; } equals ( jav... | org . junit . Assert . assertTrue ( n1 . equals ( n2 ) ) |
testRealSmaller ( ) { executeWithDefaultScope ( "boolVar<sp>=<sp>2.0f<sp><<sp>2.1f" ) ; "<AssertPlaceHolder>" ; } getBoolValue ( ) { return context . getVariable ( "boolVar" ) . getValue ( ) ; } | org . junit . Assert . assertEquals ( true , getBoolValue ( ) ) |
processOptionsNoExpression ( ) { org . apache . hadoop . fs . shell . find . Find find = new org . apache . hadoop . fs . shell . find . Find ( ) ; find . setConf ( org . apache . hadoop . fs . shell . find . TestFind . conf ) ; java . lang . String args = "path" ; java . lang . String expected = "Print(;)" ; find . pr... | org . junit . Assert . assertEquals ( expected , expression . toString ( ) ) |
testFormat ( ) { org . codice . ddf . catalog . ui . query . monitor . impl . HitCountFormatter hitCountFormatter = new org . codice . ddf . catalog . ui . query . monitor . impl . HitCountFormatter ( ) ; java . lang . Long hitCount = 1L ; java . lang . String result = hitCountFormatter . format ( "%[hitCount]" , mock ... | org . junit . Assert . assertThat ( result , org . hamcrest . Matchers . is ( hitCount . toString ( ) ) ) |
testGetScreenshotAsBinary ( ) { driver . get ( pages . simpleTestPage ) ; byte [ ] screenshot = screenshoter . getScreenshotAs ( OutputType . BYTES ) ; "<AssertPlaceHolder>" ; } getScreenshotAs ( org . openqa . selenium . OutputType ) { org . openqa . selenium . remote . Response response = execute ( DriverCommand . SC... | org . junit . Assert . assertTrue ( ( ( screenshot . length ) > 0 ) ) |
storesMarkBuildUnstable ( ) { configuration . setMarkBuildUnstable ( true ) ; "<AssertPlaceHolder>" ; } isMarkBuildUnstable ( ) { return config . isMarkBuildUnstable ( ) ; } | org . junit . Assert . assertThat ( configuration . isMarkBuildUnstable ( ) , org . hamcrest . CoreMatchers . is ( true ) ) |
test_until_TemporalUnit ( int , int , int , int , int , int , java . time . temporal . TemporalUnit , long ) { org . threeten . extra . chrono . EthiopicDate start = org . threeten . extra . chrono . EthiopicDate . of ( year1 , month1 , dom1 ) ; org . threeten . extra . chrono . EthiopicDate end = org . threeten . extr... | org . junit . Assert . assertEquals ( expected , start . until ( end , unit ) ) |
testSerializeIdWithOtherFieldName ( ) { org . emfjson . jackson . module . EMFModule module = new org . emfjson . jackson . module . EMFModule ( ) ; module . configure ( EMFModule . Feature . OPTION_USE_ID , true ) ; module . configure ( EMFModule . Feature . OPTION_SERIALIZE_TYPE , false ) ; module . setIdentityInfo (... | org . junit . Assert . assertEquals ( expected , result ) |
formatTest ( ) { java . lang . String json = "{'age':23,'aihao':['pashan','movies'],'name':{'firstName':'zhang','lastName':'san','aihao':['pashan','movies','name':{'firstName':'zhang','lastName':'san','aihao':['pashan','movies']}]}}" ; java . lang . String result = cn . hutool . json . JSONStrFormater . format ( json )... | org . junit . Assert . assertNotNull ( result ) |
testAccept ( ) { com . thoughtworks . qdox . model . expression . ExpressionVisitor visitor = mock ( com . thoughtworks . qdox . model . expression . ExpressionVisitor . class ) ; com . thoughtworks . qdox . model . expression . Equals expr = new com . thoughtworks . qdox . model . expression . Equals ( null , null ) ;... | org . junit . Assert . assertSame ( expr . accept ( visitor ) , visitResult ) |
shouldBeFlushedWithAutoCompleteIfBufferedRecords ( ) { buildMockProducer ( true ) ; producer . send ( record1 ) ; "<AssertPlaceHolder>" ; } flushed ( ) { return this . completions . isEmpty ( ) ; } | org . junit . Assert . assertTrue ( producer . flushed ( ) ) |
testPinUnexport ( ) { com . pi4j . io . gpio . test . GpioPinPwmOutputTests . pin . unexport ( ) ; "<AssertPlaceHolder>" ; } isExported ( ) { return exported ; } | org . junit . Assert . assertFalse ( com . pi4j . io . gpio . test . GpioPinPwmOutputTests . pin . isExported ( ) ) |
shouldFindAll ( ) { java . util . List < net . rrm . ehour . persistence . project . dao . Project > projects = projectDAO . findAll ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return nodes . size ( ) ; } | org . junit . Assert . assertEquals ( 5 , projects . size ( ) ) |
longLoadSaveTestYaml ( ) { net . citizensnpcs . api . persistence . PersistenceLoaderTest . LongLoadSaveTest load = new net . citizensnpcs . api . persistence . PersistenceLoaderTest . LongLoadSaveTest ( ) ; load . term = 3 ; net . citizensnpcs . api . persistence . PersistenceLoader . save ( load , yamlRoot ) ; yamlRo... | org . junit . Assert . assertEquals ( load . term , 3 ) |
test ( ) { com . predic8 . membrane . examples . Process2 sl = new com . predic8 . membrane . examples . Process2 . Builder ( ) . in ( getExampleDir ( "groovy" ) ) . script ( "service-proxy" ) . waitForMembrane ( ) . start ( ) ; try { com . predic8 . membrane . examples . util . SubstringWaitableConsoleEvent groovyCall... | org . junit . Assert . assertTrue ( groovyCalled . occurred ( ) ) |
testGetCombinedAutocompleteTrims ( ) { java . lang . String inOne = "<sp>foo" ; java . lang . String inTwo = "bar<sp>" ; java . lang . String expected = "foo<sp>bar" ; "<AssertPlaceHolder>" ; } getCombinedAutocomplete ( java . lang . String , java . lang . String [ ] ) { if ( com . github . bordertech . wcomponents . a... | org . junit . Assert . assertEquals ( expected , com . github . bordertech . wcomponents . autocomplete . AutocompleteUtil . getCombinedAutocomplete ( inOne , inTwo ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.