input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
getNewIdName ( ) { java . lang . String id = "myId_w1-wip56" ; java . lang . String appendix = "test" ; java . lang . String expectedId = ( "myId_w1-wip56-" + appendix ) + "-w1-wip1" ; org . eclipse . winery . common . ids . definitions . ServiceTemplateId serviceTemplateId = new org . eclipse . winery . common . ids .... | org . junit . Assert . assertEquals ( expectedId , org . eclipse . winery . common . version . VersionUtils . getNewComponentVersionId ( serviceTemplateId , appendix ) ) |
testSwapObject ( ) { final java . lang . Integer [ ] array = new java . lang . Integer [ ] { 4 , 8 , 12 , 15 , 18 } ; org . apache . sis . util . ArraysExt . swap ( array , 1 , 3 ) ; "<AssertPlaceHolder>" ; } swap ( java . lang . Object [ ] , int , int ) { final java . lang . Object t = data [ i0 ] ; data [ i0 ] = data... | org . junit . Assert . assertArrayEquals ( new java . lang . Integer [ ] { 4 , 15 , 12 , 8 , 18 } , array ) |
testAddingPrivateMethodByReflection ( ) { java . lang . reflect . Method method = a . org . fakereplace . test . replacement . privatemethod . PrivateMethodClass . class . getDeclaredMethod ( "realResult" ) ; method . setAccessible ( true ) ; a . org . fakereplace . test . replacement . privatemethod . PrivateMethodCla... | org . junit . Assert . assertEquals ( 1 , method . invoke ( cls ) ) |
defaultOverwriteConfigOnShutdown ( ) { "<AssertPlaceHolder>" ; } isOverwriteConfigOnShutdown ( ) { return overwriteConfigOnShutdown ; } | org . junit . Assert . assertThat ( configuration . isOverwriteConfigOnShutdown ( ) , org . hamcrest . CoreMatchers . is ( true ) ) |
testFindUser_empty_user ( ) { when ( userService . findUser ( "" ) ) . thenReturn ( User . NULL_USER ) ; java . lang . String result = instance . findUser ( "" , model ) ; "<AssertPlaceHolder>" ; verify ( model ) . addAttribute ( "user" , User . NULL_USER ) ; } findUser ( java . lang . String , org . springframework . ... | org . junit . Assert . assertEquals ( "user" , result ) |
typeId ( ) { for ( byte i = 0 ; i <= 9 ; i ++ ) { "<AssertPlaceHolder>" ; } } fromTypeId ( byte ) { switch ( headerTypeId ) { case 0 : return software . amazon . eventstream . HeaderType . TRUE ; case 1 : return software . amazon . eventstream . HeaderType . FALSE ; case 2 : return software . amazon . eventstream . Hea... | org . junit . Assert . assertEquals ( i , software . amazon . eventstream . HeaderType . fromTypeId ( i ) . headerTypeId ) |
testRewriteTokenRoot ( ) { java . lang . String grammar = "grammar<sp>T;\n" + ( ( ( ( ( ( ( ( ( "options<sp>{output=AST;}\n" + "INT<sp>:<sp>\'0\'..\'9\'+<sp>;\n" 6 ) + "<sp>public<sp>V(Token<sp>t)<sp>{<sp>token=t;}\n" ) + "<sp>public<sp>String<sp>toString()<sp>{<sp>return<sp>token.getText()+\"<V>\"INT<sp>:<sp>\'0\'..\'... | org . junit . Assert . assertEquals ( "INT<sp>:<sp>\'0\'..\'9\'+<sp>;\n" 0 , found ) |
testGetObject1 ( ) { java . util . List [ ] results = exampleResults2 ( ) ; org . teiid . jdbc . ResultSetImpl rs = new org . teiid . jdbc . ResultSetImpl ( exampleResultsMsg2a ( ) , statement ) ; java . lang . String actual = null ; java . lang . String expected = "a3" ; for ( int i = 0 ; i < ( ( results . length ) - ... | org . junit . Assert . assertEquals ( expected , actual ) |
testHasSegmentsEntryRel ( ) { com . liferay . segments . model . SegmentsEntry segmentsEntry = com . liferay . segments . test . util . SegmentsTestUtil . addSegmentsEntry ( _group . getGroupId ( ) ) ; int classNameId = com . liferay . portal . kernel . test . util . RandomTestUtil . randomInt ( ) ; int classPK = com .... | org . junit . Assert . assertTrue ( _segmentsEntryRelLocalService . hasSegmentsEntryRel ( segmentsEntry . getSegmentsEntryId ( ) , classNameId , classPK ) ) |
testCustomCreateStrategy ( ) { org . glassfish . hk2 . tests . locator . classanalysis . ServiceWithManyDoubles service = org . glassfish . hk2 . tests . locator . classanalysis . ClassAnalysisTest . locator . create ( org . glassfish . hk2 . tests . locator . classanalysis . ServiceWithManyDoubles . class , DoubleClas... | org . junit . Assert . assertNotNull ( service ) |
testBerichtSyntaxException ( ) { final java . lang . String berichtOrigineel = org . apache . commons . io . IOUtils . toString ( nl . moderniseringgba . isc . esb . message . brp . impl . ErkenningVernietigingAntwoordBerichtTest . class . getResourceAsStream ( "erkenningVernietigingAntwoordBerichtSyntaxExceptionBerich... | org . junit . Assert . assertTrue ( ( brpBericht instanceof nl . moderniseringgba . isc . esb . message . brp . impl . OngeldigBericht ) ) |
testGetTestInstance ( ) { com . hazelcast . simulator . worker . testcontainer . BaseTest test = new com . hazelcast . simulator . worker . testcontainer . BaseTest ( ) ; testContainer = createTestContainer ( test ) ; "<AssertPlaceHolder>" ; } getTestInstance ( ) { return testInstance ; } | org . junit . Assert . assertEquals ( test , testContainer . getTestInstance ( ) ) |
pojoTest ( ) { org . apache . apex . malhar . lib . utils . serde . GenericSerde < org . apache . apex . malhar . lib . utils . serde . GenericSerdeTest . TestPojo > serdePojo = new org . apache . apex . malhar . lib . utils . serde . GenericSerde ( ) ; org . apache . apex . malhar . lib . utils . serde . GenericSerdeT... | org . junit . Assert . assertEquals ( pojo , deserializedPojo ) |
testConvertToAvroDouble ( ) { java . lang . String expected = "123456.78901234" ; org . talend . daikon . avro . converter . AvroConverter < java . lang . Object , java . lang . String > converter = new org . talend . codegen . converter . BigDecimalStringDoubleConverter ( ) ; java . lang . String actual = converter . ... | org . junit . Assert . assertEquals ( expected , actual ) |
testGetAllCommunities_EmptyBusinessDetail ( ) { try { gov . hhs . fha . nhinc . connectmgr . ConnectionManagerCache connectionManager = createConnectionManager_Empty ( ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Throwable t ) { t . printStackTrace ( ) ; org . junit . Assert . fail ( ( "Error<sp>running<sp>testG... | org . junit . Assert . assertTrue ( connectionManager . getAllBusinessEntities ( ) . isEmpty ( ) ) |
testPeek ( ) { parser . parseByteArrayField ( 4 ) ; "<AssertPlaceHolder>" ; } peek ( ) { if ( ( pointer ) < ( array . length ) ) { return array [ pointer ] ; } else { throw new de . rub . nds . tlsattacker . core . exceptions . ParserException ( "Cannot<sp>peek,<sp>would<sp>peek<sp>over<sp>the<sp>end<sp>ot<sp>the<sp>ar... | org . junit . Assert . assertEquals ( 4 , parser . peek ( ) ) |
openShouldOpenAHttpURLConnectionAndInjectItIntoAHttpURLConnectionHttpChannel ( ) { java . net . URL url = org . powermock . api . mockito . PowerMockito . mock ( java . net . URL . class ) ; java . net . HttpURLConnection httpURLConnection = mock ( java . net . HttpURLConnection . class ) ; org . codegist . crest . io ... | org . junit . Assert . assertSame ( expected , actual ) |
convertWoff1_toOtf_validatorPasses ( ) { org . mabb . fontverter . FVFont otfFont = org . mabb . fontverter . FontVerter . convertFont ( ( ( org . mabb . fontverter . TestUtils . TEST_PATH ) + "Open-Sans-WOFF-1.0.woff" ) , FontVerter . FontFormat . OTF ) ; byte [ ] fontData = otfFont . getData ( ) ; org . mabb . fontve... | org . junit . Assert . assertTrue ( otfFont . isValid ( ) ) |
test_atDay_loop20years ( ) { org . threeten . extra . YearWeek yearWeek = org . threeten . extra . YearWeek . of ( 1998 , 51 ) ; java . time . LocalDate expected = java . time . LocalDate . of ( 1998 , 12 , 14 ) ; for ( int i = 0 ; i < ( 20 * 53 ) ; i ++ ) { for ( int j = 1 ; j <= 7 ; j ++ ) { java . time . DayOfWeek d... | org . junit . Assert . assertEquals ( expected , actual ) |
getZigBeeNetworkKey ( ) { com . zsmartsystems . zigbee . transport . ZigBeeTransportTransmit transport = org . mockito . Mockito . mock ( com . zsmartsystems . zigbee . transport . ZigBeeTransportTransmit . class ) ; com . zsmartsystems . zigbee . ZigBeeNetworkManager manager = new com . zsmartsystems . zigbee . ZigBee... | org . junit . Assert . assertEquals ( key , manager . getZigBeeNetworkKey ( ) ) |
testEquals ( ) { tillerino . tillerinobot . predicates . NumericPropertyPredicate < tillerino . tillerinobot . predicates . TitleLength > build = builder . build ( "tl=12" , null ) ; "<AssertPlaceHolder>" ; } build ( java . lang . String , tillerino . tillerinobot . lang . Language ) { if ( ! ( argument . toLowerCase (... | org . junit . Assert . assertEquals ( new tillerino . tillerinobot . predicates . NumericPropertyPredicate ( "tl=12" , new tillerino . tillerinobot . predicates . TitleLength ( ) , 12 , true , 12 , true ) , build ) |
inverseMatching5 ( ) { dakara . eclipse . plugin . kavi . picklist . InputCommand inputCommand = dakara . eclipse . plugin . kavi . picklist . InputCommand . parse ( "abc!xyz!adg" ) ; java . util . List < dakara . eclipse . plugin . stringscore . RankedItem < dakara . eclipse . plugin . kavi . picklist . ListRankAndSel... | org . junit . Assert . assertEquals ( 2 , listItems . size ( ) ) |
runDouble ( ) { java . lang . String aMessage1 = "helloFromFirst" ; java . io . InputStream stream1 = new java . io . ByteArrayInputStream ( aMessage1 . getBytes ( ) ) ; externalProcessReader = new com . att . aro . core . commandline . impl . ExternalProcessReaderImpl ( ) ; externalProcessReader . setInputStream ( str... | org . junit . Assert . assertTrue ( com . att . aro . core . commandline . impl . ExternalProcessReaderImplTest . message . equals ( ( ( ( "1:" + aMessage1 ) + "2:" ) + aMessage2 ) ) ) |
shouldNotFindAnythingWhenSearchingForRandomTicketKey ( ) { org . unitedinternet . cosmo . model . CollectionSubscription sub = this . subscriptionDao . findByTicket ( java . util . UUID . randomUUID ( ) . toString ( ) ) ; "<AssertPlaceHolder>" ; } toString ( ) { return org . apache . commons . lang . builder . ToString... | org . junit . Assert . assertNull ( sub ) |
createKeyWrapper_pgp_key ( ) { final net . ripe . db . whois . common . rpsl . RpslObject rpslObject = net . ripe . db . whois . common . rpsl . RpslObject . parse ( ( "source:<sp>TEST\n" 2 + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "key-cert:<sp>X509-1\n" + "method:<sp>X509\n" ) + "owner:<sp>/C=NL/O=RIPE<sp>NCC/O... | org . junit . Assert . assertTrue ( ( keyWrapper instanceof net . ripe . db . whois . update . keycert . X509CertificateWrapper ) ) |
peekFirstTest ( ) { for ( int i = 0 ; i < ( TEST_QTY ) ; i ++ ) { java . lang . String str = java . lang . Integer . toString ( i ) ; testList . addFirst ( str ) ; "<AssertPlaceHolder>" ; } } peekFirst ( ) { org . threadly . concurrent . collections . ConcurrentArrayList . DataSet < T > set = currentData ; if ( ( set .... | org . junit . Assert . assertEquals ( str , testList . peekFirst ( ) ) |
testFindAll ( ) { org . sculptor . framework . domain . PagingParameter pagingParameter = org . sculptor . framework . domain . PagingParameter . pageAccess ( PagingParameter . DEFAULT_PAGE_SIZE ) ; org . sculptor . framework . domain . PagedResult < org . sculptor . examples . library . person . domain . Person > page... | org . junit . Assert . assertTrue ( ( ( pagedResult . getValues ( ) . size ( ) ) >= 3 ) ) |
fileTest ( ) { java . io . File file = cn . hutool . core . io . FileUtil . file ( "d:/aaa" , "bbb" ) ; "<AssertPlaceHolder>" ; cn . hutool . core . io . FileUtil . file ( file , "../ccc" ) ; } file ( java . lang . String , java . lang . String ) { return cn . hutool . core . io . FileUtil . file ( new java . io . File... | org . junit . Assert . assertNotNull ( file ) |
shouldReturnExistingCompanyEntityId ( ) { com . qcadoo . model . api . Entity company = org . mockito . Mockito . mock ( com . qcadoo . model . api . Entity . class ) ; given ( company . getId ( ) ) . willReturn ( 13L ) ; given ( parameterService . getParameter ( ) ) . willReturn ( parameter ) ; given ( parameter . get... | org . junit . Assert . assertEquals ( java . lang . Long . valueOf ( 13L ) , id ) |
testIsSubscribedNoTransport ( ) { com . workiva . frugal . transport . FSubscription sub = com . workiva . frugal . transport . FSubscription . of ( topic , null ) ; "<AssertPlaceHolder>" ; } isSubscribed ( ) { return ( ( transport ) != null ) && ( transport . isSubscribed ( ) ) ; } | org . junit . Assert . assertFalse ( sub . isSubscribed ( ) ) |
testSet_int_IAtomContainer ( ) { org . openscience . cdk . ConformerContainer container = new org . openscience . cdk . ConformerContainer ( confs ) ; int location = 5 ; container . set ( location , container . get ( ( location + 1 ) ) ) ; "<AssertPlaceHolder>" ; } indexOf ( java . lang . Object ) { org . openscience .... | org . junit . Assert . assertEquals ( location , container . indexOf ( container . get ( ( location + 1 ) ) ) ) |
test_0 ( ) { cfvbaibai . cardfantasy . test . func . SkillTestContext context = prepare ( 50 , 50 , "" , "" , "" ) ; context . addToField ( 0 , 0 ) ; context . addToHand ( 1 , 0 ) . setSummonDelay ( 0 ) ; context . addToHand ( 2 , 1 ) . setSummonDelay ( 100 ) ; cfvbaibai . cardfantasy . engine . Field fieldA = context ... | org . junit . Assert . assertEquals ( 2 , fieldA . size ( ) ) |
setGetPositionMinus1 ( ) { int sequenceInitial = 11 ; long position = ( 1L << 48 ) - 1 ; rollCycleEncodeSequence . setSequence ( sequenceInitial , position ) ; long sequence = rollCycleEncodeSequence . getSequence ( position ) ; "<AssertPlaceHolder>" ; } getSequence ( long ) { if ( ( writePositionAndSequence ) == null ... | org . junit . Assert . assertEquals ( sequenceInitial , sequence ) |
testResolveTokens ( ) { com . google . code . siren4j . component . Entity ent = com . google . code . siren4j . converter . ReflectingConverter . newInstance ( ) . toEntity ( getTestCourse ( ) ) ; com . google . code . siren4j . component . Entity authorsEnt = com . google . code . siren4j . util . ComponentUtils . ge... | org . junit . Assert . assertEquals ( expected , selfLink . getHref ( ) ) |
testTimeout ( ) { org . nutz . http . Response response = org . nutz . http . Http . get ( "www.baidu.com" , ( 10 * 1000 ) ) ; "<AssertPlaceHolder>" ; org . nutz . http . Http . get ( "www.baidu.com" , 1 ) ; } getStatus ( ) { return status ; } | org . junit . Assert . assertTrue ( ( ( response . getStatus ( ) ) == 200 ) ) |
testNativeSort3_1 ( ) { org . nd4j . linalg . api . ndarray . INDArray array = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 2017152 , 2017152 , DataType . DOUBLE ) . reshape ( 1 , ( - 1 ) ) ; org . nd4j . linalg . api . ndarray . INDArray exp = array . dup ( ) ; org . nd4j . linalg . ops . transforms . Transfo... | org . junit . Assert . assertEquals ( exp , res ) |
testAsErrorReply ( ) { final java . util . List < com . allanbank . mongodb . bson . Document > docs = java . util . Collections . singletonList ( com . allanbank . mongodb . bson . builder . BuilderFactory . start ( ) . addInteger ( "ok" , ( - 23 ) ) . build ( ) ) ; final com . allanbank . mongodb . client . message .... | org . junit . Assert . assertEquals ( ( - 23 ) , error . getOkValue ( ) ) |
testSerialization ( ) { org . jfree . data . xy . OHLCDataItem i1 = new org . jfree . data . xy . OHLCDataItem ( new java . util . Date ( 1L ) , 1.0 , 2.0 , 3.0 , 4.0 , 5.0 ) ; org . jfree . data . xy . OHLCDataItem i2 = ( ( org . jfree . data . xy . OHLCDataItem ) ( org . jfree . chart . TestUtilities . serialised ( i... | org . junit . Assert . assertEquals ( i1 , i2 ) |
testRestrictColumnsPreparedStatement ( ) { java . sql . PreparedStatement ps = methodWatcher . prepareStatement ( ( "select<sp>" + ( ( ( ( ( ( ( "t.tablename<sp>as<sp>table_name," + "c.columnname<sp>" ) + "from<sp>" ) + "sys.systables<sp>t," ) + "sys.syscolumns<sp>c<sp>" ) + "where<sp>" ) + "c.referenceid<sp>=<sp>t.tab... | org . junit . Assert . assertTrue ( "%" 0 , ( ( rows . size ( ) ) > 0 ) ) |
testGetCharsPartialFirstBlockDeep ( ) { int src_offset = ( m . blockSize ( ) ) + 1 ; if ( src_offset > ( m_allocationSize ) ) { src_offset = ( m_allocationSize ) / 2 ; } int p = m . malloc ( m_allocationSize ) ; int numChars = ( ( m_allocationSize ) - src_offset ) * 2 ; char [ ] buf = new char [ numChars ] ; for ( int ... | org . junit . Assert . assertArrayEquals ( buf , buf2 ) |
violationFileShouldBeCreatedOnVerificationStop ( ) { new java . io . File ( sortpom . parameter . ViolationFileParameterTest . FILENAME_WITHOUT_DIRECTORIES ) . delete ( ) ; sortpom . util . SortPomImplUtil . create ( ) . verifyFail ( "Stop" ) . violationFile ( sortpom . parameter . ViolationFileParameterTest . FILENAME... | org . junit . Assert . assertThat ( file . exists ( ) , org . hamcrest . Matchers . is ( true ) ) |
testLagOnlyPropagation ( ) { master . append ( origin . query ( ) . all ( ) . asResultSet ( ) . subset ( 0 , 500 ) ) ; master . mergeAppend ( origin . query ( ) . all ( ) . asResultSet ( ) . subset ( 500 , 600 ) ) ; master . commit ( ) ; java . lang . String lagName = master . getIrregularPartition ( ) . getName ( ) ; ... | org . junit . Assert . assertEquals ( lagName , master . getIrregularPartition ( ) . getName ( ) ) |
testDoImportRecordsMigrationExceptionWithInvalidChecksum ( ) { expectZipWithChecksum ( false ) ; configurationMigrationManager . doExport ( path ) ; org . codice . ddf . migration . MigrationReport report = configurationMigrationManager . doImport ( path ) ; "<AssertPlaceHolder>" ; reportHasErrorMessage ( report . erro... | org . junit . Assert . assertThat ( report . wasSuccessful ( ) , org . hamcrest . Matchers . equalTo ( false ) ) |
hasPermissionToDeleteResourceRelationWhenUserHasPermissionToEditAllResourcesOnSpecificEnvironment ( ) { ch . puzzle . itc . mobiliar . business . security . control . ResourceEntity app = resourceEntityBuilder . mockApplicationEntity ( "app" , appResourceGroup , null ) ; when ( sessionContext . isCallerInRole ( ch . pu... | org . junit . Assert . assertTrue ( result ) |
example00 ( ) { "<AssertPlaceHolder>" ; } example00 ( ) { org . junit . Assert . assertEquals ( 0.7812F , org . simmetrics . example . StringMetricBuilderExample . example00 ( ) , org . simmetrics . example . StringMetricBuilderExampleTest . DELTA ) ; } | org . junit . Assert . assertEquals ( 0.7812F , org . simmetrics . example . StringMetricBuilderExample . example00 ( ) , org . simmetrics . example . StringMetricBuilderExampleTest . DELTA ) |
splitFolderTestRootAllFL ( ) { java . util . Set < org . talend . dataprep . qa . dto . Folder > result = folderUtil . splitFolder ( rootPathF , allFList ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( ( ( ( org . apache . commons . lang3 . StringUtils . isEmpty ( title ) ) && ( org . apache . commons . lang3 . St... | org . junit . Assert . assertTrue ( result . isEmpty ( ) ) |
getStatus_no_status ( ) { javax . servlet . http . HttpServletRequest request = mock ( javax . servlet . http . HttpServletRequest . class ) ; doReturn ( null ) . when ( request ) . getAttribute ( "javax.servlet.error.status_code" ) ; org . springframework . http . HttpStatus result = controller . getStatus ( request )... | org . junit . Assert . assertThat ( result , org . hamcrest . Matchers . is ( HttpStatus . INTERNAL_SERVER_ERROR ) ) |
testLegendEvents ( ) { org . jfree . data . general . DefaultPieDataset dataset = new org . jfree . data . general . DefaultPieDataset ( ) ; org . jfree . chart . JFreeChart chart = org . jfree . chart . ChartFactory . createPieChart ( "title" , dataset ) ; chart . addChangeListener ( this ) ; this . lastChartChangeEve... | org . junit . Assert . assertNotNull ( this . lastChartChangeEvent ) |
testShouldFireSyncEvent ( ) { java . util . concurrent . atomic . AtomicInteger counter = com . liferay . document . library . app . service . test . DLAppServiceTestUtil . registerDLSyncEventProcessorMessageListener ( DLSyncConstants . EVENT_ADD ) ; com . liferay . portal . kernel . service . ServiceContext serviceCon... | org . junit . Assert . assertEquals ( 4 , counter . get ( ) ) |
shouldCheckAgeIsNullCauseDateOfBirtheIsNull ( ) { org . agoncal . book . javaee7 . chapter06 . ex38 . Customer38 customer = new org . agoncal . book . javaee7 . chapter06 . ex38 . Customer38 ( ) ; customer . calculateAge ( ) ; "<AssertPlaceHolder>" ; } getAge ( ) { return age ; } | org . junit . Assert . assertNull ( customer . getAge ( ) ) |
shouldUpdateHasNewPointAvailableWhenNotFirstPointAndWindowFull ( ) { int addedElementsNumber = 2 ; boolean isFull = true ; com . orange . dgil . trail . core . vecto . SlidingWindow slidingWindow = org . mockito . Mockito . mock ( com . orange . dgil . trail . core . vecto . SlidingWindow . class ) ; com . orange . dgi... | org . junit . Assert . assertTrue ( newPointAvailable ) |
remoteMapWithUpdating_when_functionReturnsNull_then_keyIsRemoved ( ) { java . util . List < java . lang . Integer > input = sequence ( itemCount ) ; putToMap ( com . hazelcast . jet . pipeline . SinksTest . remoteHz . getMap ( srcName ) , input ) ; com . hazelcast . jet . pipeline . Sink < java . util . Map . Entry < j... | org . junit . Assert . assertEquals ( 0 , actual . size ( ) ) |
testAddFieldWithWLabel ( ) { com . github . bordertech . wcomponents . WFieldLayout layout = new com . github . bordertech . wcomponents . WFieldLayout ( ) ; com . github . bordertech . wcomponents . WField field = layout . addField ( new com . github . bordertech . wcomponents . WLabel ( "Test" ) , new com . github . ... | org . junit . Assert . assertNotNull ( field ) |
item ( ) { org . hawkular . client . android . backend . model . Metric metric = generateMetric ( ) ; java . util . List < org . hawkular . client . android . backend . model . Metric > metrics = new java . util . ArrayList ( ) ; metrics . add ( metric ) ; metrics . addAll ( generateMetrics ( ) ) ; org . hawkular . cli... | org . junit . Assert . assertThat ( metricsAdapter . getItem ( 0 ) , org . hamcrest . core . Is . is ( metric ) ) |
templateUnclosedPlaceholder ( ) { java . lang . String orig = ( com . sun . btrace . ArgsMapTest . KEY1 ) + "${" ; java . lang . String value = instance . template ( orig ) ; "<AssertPlaceHolder>" ; } template ( java . lang . String ) { if ( value == null ) { return null ; } if ( value . isEmpty ( ) ) { return value ; ... | org . junit . Assert . assertEquals ( orig , value ) |
testEquals03 ( ) { java . util . List < org . dresdenocl . modelinstancetype . types . IModelInstanceString > elements01 ; elements01 = new java . util . ArrayList < org . dresdenocl . modelinstancetype . types . IModelInstanceString > ( ) ; elements01 . add ( org . dresdenocl . modelinstancetype . types . base . Basis... | org . junit . Assert . assertFalse ( modelInstanceCollection01 . equals ( modelInstanceCollection02 ) ) |
testQuotedQuery ( ) { java . lang . String actual = "select<sp>\"t\".*<sp>from<sp>\"myschema\".\"mytable\"<sp>as<sp>\"t\"" ; org . verdictdb . sqlreader . NonValidatingSQLParser sqlToRelation = new org . verdictdb . sqlreader . NonValidatingSQLParser ( ) ; org . verdictdb . core . sqlobject . SelectQuery expected = org... | org . junit . Assert . assertEquals ( expected , sel ) |
testGetHttpURLFromHeaderUrl ( ) { org . apache . camel . Endpoint endpoint = org . mockito . Mockito . mock ( org . apache . camel . Endpoint . class ) ; org . apache . camel . Exchange exchange = org . mockito . Mockito . mock ( org . apache . camel . Exchange . class ) ; org . apache . camel . Message message = org .... | org . junit . Assert . assertEquals ( org . apache . camel . opentracing . decorators . AbstractHttpSpanDecoratorTest . TEST_URI , decorator . getHttpURL ( exchange , endpoint ) ) |
testConfigureCollectionPrefixIsEncodedOldEncoding ( ) { System . out . println ( ( ( getTestTraceHead ( "[NGSIMongoBaseSink.configure]" ) ) + "--------<sp>Configured<sp>'collection_prefix'<sp>is<sp>encoded<sp>when<sp>having<sp>forbidden<sp>characters" ) ) ; java . lang . String collectionPrefix = "this\\is/a$prefix.wit... | org . junit . Assert . assertEquals ( expectedCollectionPrefix , sink . collectionPrefix ) |
createSoyPortlet ( ) { wizardAction . openNewLiferayModuleWizard ( ) ; wizardAction . newModule . prepareMaven ( project . getName ( ) , com . liferay . ide . ui . portlet . tests . SOY_PORTLET ) ; wizardAction . finish ( ) ; "<AssertPlaceHolder>" ; viewAction . project . closeAndDelete ( project . getName ( ) ) ; } vi... | org . junit . Assert . assertTrue ( viewAction . project . visibleFileTry ( project . getName ( ) ) ) |
g_V_mapXselectXaXX ( ) { final org . apache . tinkerpop . gremlin . process . traversal . Traversal < org . apache . tinkerpop . gremlin . structure . Vertex , org . apache . tinkerpop . gremlin . structure . Vertex > traversal = get_g_V_mapXselectXaXX ( ) ; printTraversalForm ( traversal ) ; int counter = 0 ; while ( ... | org . junit . Assert . assertEquals ( 6 , counter ) |
shouldCheckGetCustomerByFirstnameURI ( ) { javax . ws . rs . core . Response response = org . agoncal . book . javaee7 . chapter15 . ex07 . CustomerRestService07IT . client . target ( "http://localhost:8282/07/customer/search;firstname=AntonioNull" ) . request ( ) . get ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 200 , response . getStatus ( ) ) |
testParse_GermanLocale ( ) { org . oscm . converter . PriceConverter converter = new org . oscm . converter . PriceConverter ( java . util . Locale . GERMAN ) ; "<AssertPlaceHolder>" ; checkEquals ( "50.00" , converter . parse ( "50,00" ) ) ; } getActiveLocale ( ) { return activeLocale ; } | org . junit . Assert . assertEquals ( Locale . GERMAN , converter . getActiveLocale ( ) ) |
testTextFormatWithoutOffset ( ) { java . io . File fileText = new java . io . File ( io . cdap . plugin . batch . source . FileBatchSourceTest . temporaryFolder . newFolder ( ) , "test.txt" ) ; java . lang . String outputDatasetName = java . util . UUID . randomUUID ( ) . toString ( ) ; io . cdap . cdap . api . data . ... | org . junit . Assert . assertEquals ( expected , output ) |
testGetDevicesEmptyNetwork ( ) { java . util . List < com . digi . xbee . api . RemoteXBeeDevice > remotes = network . getDevices ( ) ; "<AssertPlaceHolder>" ; } getDevices ( ) { java . util . List < com . digi . xbee . api . RemoteXBeeDevice > nodes = new java . util . ArrayList < com . digi . xbee . api . RemoteXBeeD... | org . junit . Assert . assertEquals ( remotes . size ( ) , 0 ) |
testWaitForFinalResult_whenOnlyIntermediateResult_thenNoUpdate ( ) { when ( mDataSource . isFinished ( ) ) . thenReturn ( false ) ; when ( mDataSource . getResult ( ) ) . thenReturn ( mIntermediateResult ) ; doAnswer ( new org . mockito . stubbing . Answer < java . lang . Void > ( ) { @ com . facebook . datasource . Ov... | org . junit . Assert . assertEquals ( null , actual ) |
testCreateHttpClientOptions ( ) { io . vertx . core . http . HttpClientOptions obj = ( ( io . vertx . core . http . HttpClientOptions ) ( mockit . Deencapsulation . invoke ( instance , "createHttpClientOptions" ) ) ) ; "<AssertPlaceHolder>" ; } invoke ( org . apache . servicecomb . core . Invocation , org . apache . se... | org . junit . Assert . assertNotNull ( obj ) |
testGetLastDropCreatedDate ( ) { org . joda . time . DateTime now = new org . joda . time . DateTime ( "2018-06-08T14:00:00.000-07:00" , dateTimeZone ) ; doReturn ( now ) . when ( dateTimeUtils ) . now ( dateTimeZone ) ; org . joda . time . DateTime expResult = new org . joda . time . DateTime ( "2018-06-06T20:00:00.00... | org . junit . Assert . assertEquals ( expResult , result ) |
testHasAdobeSegmentOnImageWithNoAdobeSegment ( ) { java . nio . file . Path file = edu . illinois . library . cantaloupe . test . TestUtil . getImage ( "jpg-exif.jpg" ) ; try ( javax . imageio . stream . ImageInputStream is = javax . imageio . ImageIO . createImageInputStream ( file . toFile ( ) ) ) { instance . setSou... | org . junit . Assert . assertFalse ( instance . hasAdobeSegment ( ) ) |
getLoggerByNullClass ( ) { "<AssertPlaceHolder>" ; } getLogger ( java . lang . Class ) { final java . lang . Class < ? > cls = org . apache . logging . log4j . LogManager . callerClass ( clazz ) ; return org . apache . logging . log4j . LogManager . getContext ( cls . getClassLoader ( ) , false ) . getLogger ( org . ap... | org . junit . Assert . assertNotNull ( org . apache . logging . log4j . LogManager . getLogger ( ( ( java . lang . Class < ? > ) ( null ) ) ) ) |
testSyncPropertiesMappingDQuoteName ( ) { org . apache . jackrabbit . oak . spi . security . authentication . external . ExternalUser externalUser = idp . getUser ( TestIdentityProvider . ID_SECOND_USER ) ; sync ( externalUser ) ; org . apache . jackrabbit . api . security . user . Authorizable a = userManager . getAut... | org . junit . Assert . assertFalse ( a . hasProperty ( propName ) ) |
nameShouldBeAssigned ( ) { com . graphhopper . jsprit . core . problem . job . Pickup s = Pickup . Builder . newInstance ( "s" ) . setLocation ( com . graphhopper . jsprit . core . problem . Location . newInstance ( "loc" ) ) . setName ( "name" ) . build ( ) ; "<AssertPlaceHolder>" ; } getName ( ) { return null ; } | org . junit . Assert . assertEquals ( "name" , s . getName ( ) ) |
findAll_SuccessEmptyList ( ) { java . util . List < com . kaluzny . domain . User > list = userService . findAllUsers ( ) ; "<AssertPlaceHolder>" ; } findAllUsers ( ) { com . kaluzny . service . UserServiceBean . LOGGER . debug ( "Retrieve<sp>the<sp>list<sp>of<sp>all<sp>users!" ) ; return repository . findAll ( ) ; } | org . junit . Assert . assertEquals ( true , list . isEmpty ( ) ) |
testDoGetPropertiesError ( ) { java . lang . Exception mockFileNotFoundException = mock ( java . io . FileNotFoundException . class ) ; doThrow ( mockFileNotFoundException ) . when ( fileResource . fileService ) . doGetProperties ( org . pentaho . platform . web . http . api . resources . FileResourceTest . PATH_ID ) ;... | org . junit . Assert . assertNull ( testDto ) |
checkCertificateSSCDSupport ( ) { this . configuration = new org . digidoc4j . Configuration ( Configuration . Mode . PROD ) ; org . digidoc4j . impl . asic . tsl . TslManager tslManager = new org . digidoc4j . impl . asic . tsl . TslManager ( this . configuration ) ; org . digidoc4j . TSLCertificateSource certificateS... | org . junit . Assert . assertTrue ( isValid ) |
testUC100401C10T320stap0010 ( ) { final nl . bzk . migratiebrp . bericht . model . sync . impl . AdHocZoekPersoonVerzoekBericht verzoek = new nl . bzk . migratiebrp . bericht . model . sync . impl . AdHocZoekPersoonVerzoekBericht ( ) ; verzoek . setMessageId ( "BERICHT-ID-2" ) ; verzoek . setPartijCode ( "580002" ) ; v... | org . junit . Assert . assertNull ( antwoord ) |
skip_out ( ) { java . lang . String result = process ( "__INVALID__|\n__INVALID__\n__INVALID__" , false ) ; "<AssertPlaceHolder>" ; } is ( java . lang . String ) { com . asakusafw . dmdl . java . util . JavaName jn = com . asakusafw . dmdl . java . util . JavaName . of ( new com . asakusafw . dmdl . model . AstSimpleNa... | org . junit . Assert . assertThat ( result , is ( "" ) ) |
systemDiagnosticGarbageCollection ( ) { populateSystemDiagnostics ( ) ; java . lang . String statusRequest = "systemDiagnostics:garbagecollection" ; org . apache . nifi . minifi . commons . status . FlowStatusReport actual = org . apache . nifi . minifi . status . StatusConfigReporter . getStatus ( mockFlowController ,... | org . junit . Assert . assertEquals ( expected , actual ) |
testFreeListPointer ( ) { com . orientechnologies . common . directmemory . OByteBufferPool bufferPool = com . orientechnologies . common . directmemory . OByteBufferPool . instance ( null ) ; com . orientechnologies . common . directmemory . OPointer pointer = bufferPool . acquireDirect ( true ) ; com . orientechnolog... | org . junit . Assert . assertEquals ( valuePage . getNextFreeListPage ( ) , 124 ) |
testCheckPreFlightRequestTypeEmptyHeaders ( ) { org . ebaysf . web . cors . MockHttpServletRequest request = new org . ebaysf . web . cors . MockHttpServletRequest ( ) ; request . setHeader ( CORSFilter . REQUEST_HEADER_ORIGIN , TestConfigs . HTTP_TOMCAT_APACHE_ORG ) ; request . setHeader ( CORSFilter . REQUEST_HEADER_... | org . junit . Assert . assertEquals ( CORSFilter . CORSRequestType . PRE_FLIGHT , requestType ) |
test_shouldNotChangeJavaOptsBecauseApplicationNotSelected ( ) { org . springframework . shell . core . CommandResult result = addJvmOption ( "-Dkey=value" ) ; "<AssertPlaceHolder>" ; } isFailedCommand ( ) { return new fr . treeptik . cloudunit . cli . integration . ShellMatchers . CommandStatusMatcher ( false ) ; } | org . junit . Assert . assertThat ( result , isFailedCommand ( ) ) |
testKeypointImageTransform ( ) { java . io . File tmpKeypointFile = folder . newFile ( "unused" 1 ) ; java . io . File tmpResizedKeypointFile = folder . newFile ( "keypointResized-testKeypointImageTransform.key" ) ; tmpResizedKeypointFile . delete ( ) ; java . lang . String [ ] args = null ; args = new java . lang . St... | org . junit . Assert . assertTrue ( tmpResizedKeypointFile . exists ( ) ) |
create ( ) { com . betfair . cougar . core . impl . ev . ServiceLogManager em = factory . create ( op1Key . getNamespace ( ) , op1Key . getServiceName ( ) , op1Key . getVersion ( ) ) ; "<AssertPlaceHolder>" ; } getLoggerName ( ) { return loggerName ; } | org . junit . Assert . assertEquals ( loggerName , em . getLoggerName ( ) ) |
testSSLMac ( ) { for ( de . rub . nds . tlsattacker . core . constants . MacAlgorithm macAlgo : new de . rub . nds . tlsattacker . core . constants . MacAlgorithm [ ] { de . rub . nds . tlsattacker . core . constants . MacAlgorithm . SSLMAC_MD5 , de . rub . nds . tlsattacker . core . constants . MacAlgorithm . SSLMAC_S... | org . junit . Assert . assertArrayEquals ( jceResult , utilsResult ) |
testStringWith1Byte ( ) { org . jacorb . orb . CodeSet codeSet = org . jacorb . orb . CodeSet . getCodeSet ( "utf8" ) ; org . jacorb . orb . CDROutputStream cdrOutputStream = new org . jacorb . orb . CDROutputStream ( ) ; byte [ ] expected = new byte [ ] { ( ( byte ) ( 97 ) ) } ; java . lang . String string = "a" ; cod... | org . junit . Assert . assertArrayEquals ( expected , bufferCopy ) |
test_createIndexFile_list_empty ( ) { final boolean created = new org . talend . updates . runtime . nexus . component . ComponentIndexManager ( ) . createIndexFile ( new java . io . File ( "abc.txt" ) , java . util . Collections . emptyList ( ) ) ; "<AssertPlaceHolder>" ; } createIndexFile ( java . io . File , java . ... | org . junit . Assert . assertFalse ( created ) |
cloneTest ( ) { org . dllearner . core . AbstractReasonerComponent rs = org . dllearner . test . junit . TestOntologies . getTestOntology ( TestOntology . EMPTY ) ; org . semanticweb . owlapi . model . OWLClassExpression d = org . dllearner . parser . KBParser . parseConcept ( "(male<sp>AND<sp>(human<sp>AND<sp>EXISTS<s... | org . junit . Assert . assertTrue ( ( ( comparator . compare ( tree , treeCloned ) ) == 0 ) ) |
testBerichtSyntaxException ( ) { final java . lang . String berichtOrigineel = org . apache . commons . io . IOUtils . toString ( nl . moderniseringgba . isc . esb . message . brp . impl . VerhuizingAntwoordBerichtTest . class . getResourceAsStream ( "verhuizingAntwoordBerichtSyntaxExceptionBericht.xml" ) ) ; final nl ... | org . junit . Assert . assertTrue ( ( brpBericht instanceof nl . moderniseringgba . isc . esb . message . brp . impl . OngeldigBericht ) ) |
testLocalHuangThreshold ( ) { ops . run ( net . imagej . ops . Ops . Threshold . Huang . class , out , in , new net . imglib2 . algorithm . neighborhood . RectangleShape ( 1 , false ) , new net . imglib2 . outofbounds . OutOfBoundsMirrorFactory < net . imglib2 . type . numeric . integer . ByteType , net . imglib2 . img... | org . junit . Assert . assertEquals ( true , out . firstElement ( ) . get ( ) ) |
asIntsAInsertPositionInDerivedListIsRespected ( ) { org . tessell . tests . model . properties . ListProperty < java . lang . Integer > ints = p . as ( new org . tessell . tests . model . properties . ListPropertyTest . StringToElementConverter ( ) ) ; p . set ( joist . util . Copy . list ( "3" ) ) ; ints . add ( 0 , 2... | org . junit . Assert . assertThat ( p . get ( ) , org . hamcrest . Matchers . contains ( "2" , "3" ) ) |
tableExists ( ) { when ( client . tableExists ( com . hotels . bdp . circustrain . core . source . DestructiveSourceTest . DATABASE , com . hotels . bdp . circustrain . core . source . DestructiveSourceTest . TABLE ) ) . thenReturn ( true ) ; com . hotels . bdp . circustrain . core . source . DestructiveSource source =... | org . junit . Assert . assertThat ( source . tableExists ( ) , org . hamcrest . CoreMatchers . is ( true ) ) |
testConfigViaMetaInfPropertyFile ( ) { java . lang . String key = "testProperty03" ; java . lang . String value = "test_value_03" ; java . lang . String configuredValue = org . apache . deltaspike . core . api . config . ConfigResolver . getPropertyValue ( key ) ; "<AssertPlaceHolder>" ; } getPropertyValue ( java . lan... | org . junit . Assert . assertEquals ( value , configuredValue ) |
generateRegisterUrlHttpSucceeds ( ) { final java . lang . String expectedUrl = ( ( ( ( ( ( "https://" + ( tests . unit . com . microsoft . azure . sdk . iot . provisioning . device . internal . contract . UrlPathBuilderTest . TEST_HOST_NAME ) ) + "/" ) + ( tests . unit . com . microsoft . azure . sdk . iot . provisioni... | org . junit . Assert . assertEquals ( expectedUrl , generateRequestUrl ) |
testBabelway ( ) { final com . helger . pd . indexer . businesscard . SMPBusinessCardProvider aBI = com . helger . pd . indexer . businesscard . SMPBusinessCardProvider . createWithSMLAutoDetect ( com . helger . pd . indexer . settings . PDServerConfiguration . getSMPMode ( ) , com . helger . pd . indexer . settings . ... | org . junit . Assert . assertNotNull ( aExtBI ) |
needlemanWunch ( ) { "<AssertPlaceHolder>" ; } needlemanWunch ( ) { org . junit . Assert . assertNotNull ( org . simmetrics . metrics . StringMetrics . needlemanWunch ( ) ) ; } | org . junit . Assert . assertNotNull ( org . simmetrics . metrics . StringMetrics . needlemanWunch ( ) ) |
getOriginalArtistReturnsNullIfV2TagDoesNotExist ( ) { com . mpatric . mp3agic . ID3v1 id3v1Tag = new com . mpatric . mp3agic . ID3WrapperTest . ID3v1TagForTesting ( ) ; com . mpatric . mp3agic . ID3Wrapper wrapper = new com . mpatric . mp3agic . ID3Wrapper ( id3v1Tag , null ) ; "<AssertPlaceHolder>" ; } getOriginalArti... | org . junit . Assert . assertNull ( wrapper . getOriginalArtist ( ) ) |
testCopyWithDistcp ( ) { org . apache . hadoop . fs . Path copySrc = new org . apache . hadoop . fs . Path ( "copySrc" ) ; org . apache . hadoop . fs . Path copyDst = new org . apache . hadoop . fs . Path ( "copyDst" ) ; org . apache . hadoop . hive . conf . HiveConf conf = new org . apache . hadoop . hive . conf . Hiv... | org . junit . Assert . assertTrue ( org . apache . hadoop . hive . common . FileUtils . copy ( mockFs , copySrc , mockFs , copyDst , false , false , conf , shims ) ) |
testProductsWithoutLocationService ( ) { com . aliyuncs . ram . model . v20150501 . ListAccessKeysRequest request = new com . aliyuncs . ram . model . v20150501 . ListAccessKeysRequest ( ) ; com . aliyuncs . ram . model . v20150501 . ListAccessKeysResponse response = this . client . getAcsResponse ( request ) ; "<Asser... | org . junit . Assert . assertTrue ( ( ( response . getAccessKeys ( ) . size ( ) ) > 0 ) ) |
testStringCreation ( ) { final java . lang . String dummy = dummyCreator . create ( java . lang . String . class ) ; "<AssertPlaceHolder>" ; } create ( java . lang . Class ) { return new org . dummycreator . dummyfactories . ClassBasedFactory < T > ( clazz ) . createDummy ( classBindings ) ; } | org . junit . Assert . assertEquals ( java . lang . String . class , dummy . getClass ( ) ) |
testVisitIndexCreateCommand ( ) { org . neo4j . kernel . impl . index . IndexCommand . CreateCommand cmd = mock ( IndexCommand . CreateCommand . class ) ; when ( cmd . handle ( any ( org . neo4j . kernel . impl . api . CommandVisitor . class ) ) ) . thenCallRealMethod ( ) ; boolean result = facade . visitIndexCreateCom... | org . junit . Assert . assertFalse ( result ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.