input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testUnqualifiedClassName ( ) { java . lang . String expected = "com.jakewharton.test.SomeClass" ; java . lang . String actual = com . actionbarsherlock . internal . ActionBarSherlockCompat . cleanActivityName ( "com.jakewharton.test" , "SomeClass" ) ; "<AssertPlaceHolder>" ; } cleanActivityName ( java . lang . String ,... | org . junit . Assert . assertThat ( expected , org . hamcrest . CoreMatchers . equalTo ( actual ) ) |
givenAnIntStreamThenGetTheEvenIntegers ( ) { java . util . List < java . lang . Integer > evenInts = java . util . stream . IntStream . rangeClosed ( 1 , 10 ) . filter ( ( i ) -> ( i % 2 ) == 0 ) . boxed ( ) . collect ( java . util . stream . Collectors . toList ( ) ) ; java . util . List < java . lang . Integer > expe... | org . junit . Assert . assertEquals ( expected , evenInts ) |
shouldInstrumentES6MemberFunction ( ) { java . lang . String source = "var<sp>x<sp>=<sp>{\n" + ( ( ( "<sp>mounted<sp>()<sp>{\n" + "};" 0 ) + "<sp>}\n" ) + "};" ) ; java . lang . String instrumentedSource = sourceProcessor . instrumentSource ( source ) ; java . lang . String expectedSource = "_$jscoverage[\'test.js\'].l... | org . junit . Assert . assertEquals ( expectedSource , instrumentedSource ) |
shouldNotAllowNegativeBlackMana ( ) { mage . Mana mana = mage . Mana . BlackMana ( ( - 1 ) ) ; "<AssertPlaceHolder>" ; } getBlack ( ) { return black ; } | org . junit . Assert . assertEquals ( 0 , mana . getBlack ( ) ) |
testReplicationStoreMaxCommandsToTransferBeforeCreateRdb ( ) { com . ctrip . xpipe . redis . keeper . config . KeeperConfig keeperConfig = new com . ctrip . xpipe . redis . keeper . config . DefaultKeeperConfig ( ) ; long value = 10L * ( 1 << 30 ) ; java . lang . System . setProperty ( DefaultKeeperConfig . KEY_REPLICA... | org . junit . Assert . assertEquals ( value , keeperConfig . getReplicationStoreMaxCommandsToTransferBeforeCreateRdb ( ) ) |
testOneFieldMatchesNot ( ) { japicmp . filter . JavadocLikeFieldFilter fieldFilter = new japicmp . filter . JavadocLikeFieldFilter ( "japicmp.Test#field42" ) ; javassist . CtClass ctClass = japicmp . util . CtClassBuilder . create ( ) . name ( "japicmp.Test" ) . addToClassPool ( new javassist . ClassPool ( ) ) ; javass... | org . junit . Assert . assertThat ( fieldFilter . matches ( ctField ) , org . hamcrest . core . Is . is ( false ) ) |
testTransform ( ) { "<AssertPlaceHolder>" ; } transform ( java . lang . String ) { java . util . Date date = null ; if ( ( input != null ) && ( ! ( input . trim ( ) . isEmpty ( ) ) ) ) { if ( ( format ) == null ) { for ( java . lang . String fmt : io . lumify . mapping . xform . DateValueTransformer . DEFAULT_DATE_FORM... | org . junit . Assert . assertEquals ( expected , xform . transform ( input ) ) |
testIsCompatible6 ( ) { com . milaboratory . mixcr . basictypes . ClonalSequence c1 = create ( "AAAA" , "AAA" ) ; com . milaboratory . mixcr . basictypes . ClonalSequence c2 = create ( "AA" , "AAAAA" ) ; com . milaboratory . core . mutations . Mutations < com . milaboratory . core . sequence . NucleotideSequence > muta... | org . junit . Assert . assertTrue ( c1 . isCompatible ( c2 , mutations ) ) |
testEquals ( ) { com . verigreen . common . utils . TestReflectionComparer . Sample x = new com . verigreen . common . utils . TestReflectionComparer . Sample ( 1 , "a1" ) ; com . verigreen . common . utils . TestReflectionComparer . Sample y = new com . verigreen . common . utils . TestReflectionComparer . Sample ( 1 ... | org . junit . Assert . assertTrue ( com . verigreen . common . utils . ReflectionComparer . isEquals ( x , y ) ) |
testCreateBusinessObjectDataNotificationRegistrationTrimParameters ( ) { notificationRegistrationServiceTestHelper . createDatabaseEntitiesForBusinessObjectDataNotificationRegistrationTesting ( ) ; org . finra . herd . model . api . xml . BusinessObjectDataNotificationRegistration resultBusinessObjectDataNotificationRe... | org . junit . Assert . assertEquals ( new org . finra . herd . model . api . xml . BusinessObjectDataNotificationRegistration ( resultBusinessObjectDataNotificationRegistration . getId ( ) , new org . finra . herd . model . api . xml . NotificationRegistrationKey ( NAMESPACE , NOTIFICATION_NAME ) , NotificationEventTyp... |
testIterator ( ) { final int cap = 100 ; final java . util . concurrent . BlockingQueue < java . lang . Integer > dbq = new com . conversantmedia . util . concurrent . DisruptorBlockingQueue < java . lang . Integer > ( cap ) ; for ( int i = 0 ; i < cap ; i ++ ) { dbq . offer ( java . lang . Integer . valueOf ( i ) ) ; ... | org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( ( i ++ ) ) , c ) |
testFetchByPrimaryKeyMissing ( ) { long pk = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; com . liferay . portal . kernel . model . Layout missingLayout = _persistence . fetchByPrimaryKey ( pk ) ; "<AssertPlaceHolder>" ; } fetchByPrimaryKey ( long ) { return com . liferay . adaptive .... | org . junit . Assert . assertNull ( missingLayout ) |
testMappingAerospikeConverter ( ) { org . springframework . data . aerospike . convert . MappingAerospikeConverter mappingAerospikeConverter = new org . springframework . data . aerospike . convert . MappingAerospikeConverter ( new org . springframework . data . aerospike . convert . AerospikeMappingContext ( ) , custo... | org . junit . Assert . assertNotNull ( mappingAerospikeConverter . getConversionService ( ) ) |
testRegister_component_zookeeper_connect_notPresent ( ) { com . hortonworks . streamline . streams . cluster . catalog . Cluster cluster = getTestCluster ( 1L ) ; com . hortonworks . streamline . streams . cluster . register . impl . KafkaServiceRegistrar registrar = initializeServiceRegistrar ( ) ; try { com . hortonw... | org . junit . Assert . assertNull ( kafkaService ) |
testFirstToken ( ) { org . antlr . v4 . tool . LexerGrammar g = new org . antlr . v4 . tool . LexerGrammar ( ( "lexer<sp>grammar<sp>t;\n" + ( ( ( ( ( ( "ID<sp>:<sp>\'a\'..\'z\'+;\n" + "INT<sp>:<sp>\'0\'..\'9\'+;\n" ) + "SEMI<sp>:<sp>\';\';\n" ) + "ASSIGN<sp>:<sp>\'=\';\n" ) + "PLUS<sp>:<sp>\'+\';\n" ) + "MULT<sp>:<sp>\... | org . junit . Assert . assertEquals ( expecting , result ) |
testAlignRtRowAttrsTrailingNulls1 ( ) { org . batfish . question . routes . RouteRowAttribute rra1 = org . batfish . question . routes . RouteRowAttribute . builder ( ) . setNextHop ( "node1" ) . build ( ) ; org . batfish . question . routes . RouteRowAttribute rra2 = org . batfish . question . routes . RouteRowAttribu... | org . junit . Assert . assertThat ( alignedRouteRowattrs , org . hamcrest . Matchers . equalTo ( expectedOutput ) ) |
deveObterDataHoraEventoComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . evento . cancelamento . NFInfoEventoCancelamento infoEventoCancelamento = new com . fincatto . documentofiscal . nfe310 . classes . evento . cancelamento . NFInfoEventoCancelamento ( ) ; final java . time . ZonedDateT... | org . junit . Assert . assertEquals ( dataHoraEvento , infoEventoCancelamento . getDataHoraEvento ( ) ) |
testSubmitAuditableFutureTaskSetsInstantStopped ( ) { edu . illinois . library . cantaloupe . async . MockCallable < ? > task = new edu . illinois . library . cantaloupe . async . MockCallable ( ) ; edu . illinois . library . cantaloupe . async . AuditableFutureTask < ? > future = new edu . illinois . library . cantalo... | org . junit . Assert . assertNotNull ( future . getInstantStopped ( ) ) |
testFindFirstWithoutTypeMatch ( ) { final com . allanbank . mongodb . bson . element . BinaryElement element = new com . allanbank . mongodb . bson . element . BinaryElement ( "foo" , ( ( byte ) ( 1 ) ) , new byte [ ] { 1 , 2 , 3 } ) ; final com . allanbank . mongodb . bson . Element found = element . findFirst ( ) ; "... | org . junit . Assert . assertSame ( element , found ) |
getValueFromJsonString_good_case ( ) { java . lang . String jsonString = "{\"deviceId\":\"xxx-device\",\"generationId\":\"111111111111111111\",\"etag\":\"MA==\",\"connectionState\":\"Disconnected\",\"status\":\"Disabled\",\"statusReason\":null,\"connectionStateUpdatedTime\":\"0001-01-01T00:00:00\",\"statusUpdatedTime\"... | org . junit . Assert . assertEquals ( expResult , result ) |
testInterpolation2 ( ) { final int sz = 21 ; double [ ] xval = new double [ sz ] ; double [ ] yval = new double [ sz ] ; final double delta = 1.0 / ( sz - 1 ) ; for ( int i = 0 ; i < sz ; i ++ ) { xval [ i ] = ( - 1 ) + ( ( 15 * i ) * delta ) ; yval [ i ] = ( - 20 ) + ( ( 30 * i ) * delta ) ; } org . apache . commons .... | org . junit . Assert . assertEquals ( f . value ( x , y ) , p . value ( x , y ) , tol ) |
pasteWithDisabled ( ) { openTestURL ( ) ; com . vaadin . testbench . elements . ComboBoxElement cb = $ ( com . vaadin . testbench . elements . ComboBoxElement . class ) . first ( ) ; cb . click ( ) ; org . openqa . selenium . WebElement input = cb . getInputField ( ) ; org . openqa . selenium . JavascriptExecutor js = ... | org . junit . Assert . assertFalse ( cb . isPopupOpen ( ) ) |
testWriteToTable ( ) { helloWorld . writeToTable ( ) ; com . google . cloud . bigtable . data . v2 . models . Row row = com . google . cloud . examples . bigtable . ITHelloWorld . dataClient . readRow ( com . google . cloud . examples . bigtable . ITHelloWorld . tableId , "rowKey0" ) ; "<AssertPlaceHolder>" ; } readRow... | org . junit . Assert . assertNotNull ( row ) |
testSha256PackedState ( ) { byte [ ] bytes = new byte [ 130 ] ; for ( int i = 0 ; i < ( bytes . length ) ; i ++ ) { bytes [ i ] = ( ( byte ) ( i ) ) ; } for ( int byteCount = 0 ; byteCount < ( bytes . length ) ; byteCount ++ ) { org . spongycastle . crypto . digests . SHA256Digest digest1 = new org . spongycastle . cry... | org . junit . Assert . assertArrayEquals ( hash1 , hash2 ) |
testProxybufProxyOnIgnoredPOJOClass3 ( ) { com . baidu . bjf . remoting . protobuf . Codec < com . baidu . bjf . remoting . protobuf . ignore . IgnoredPOJOClass3 > codec = com . baidu . bjf . remoting . protobuf . ProtobufProxy . create ( com . baidu . bjf . remoting . protobuf . ignore . IgnoredPOJOClass3 . class ) ; ... | org . junit . Assert . assertArrayEquals ( encode , encode2 ) |
testMkdirNonRecursiveWithExistingDir ( ) { org . apache . hadoop . fs . Path f = getTestRootPath ( org . apache . hadoop . fs . FileContextCreateMkdirBaseTest . fc , "aDir" ) ; org . apache . hadoop . fs . FileContextCreateMkdirBaseTest . fc . mkdir ( f , FileContext . DEFAULT_PERM , false ) ; "<AssertPlaceHolder>" ; }... | org . junit . Assert . assertTrue ( isDir ( org . apache . hadoop . fs . FileContextCreateMkdirBaseTest . fc , f ) ) |
testStopWordsInQueryUsingPhrase ( ) { java . util . ArrayList < java . lang . String > names = new java . util . ArrayList < java . lang . String > ( java . util . Arrays . asList ( "lin<sp>and<sp>is<sp>angry" ) ) ; edu . uci . ics . texera . dataflow . dictionarymatcher . Dictionary dictionary = new edu . uci . ics . ... | org . junit . Assert . assertTrue ( contains ) |
testPropertyReactvityOnFinalField ( ) { java . lang . String str = "rule<sp>R<sp>when\n" + ( ( ( "<sp>$a<sp>:<sp>String(<sp>length<sp>><sp>3<sp>)\n" + "then\n" ) + "<sp>System.out.println($a);\n" ) + "end\n" ) ; org . kie . api . runtime . KieSession ksession = getKieSession ( str ) ; ksession . insert ( "abcd" ) ; kse... | org . junit . Assert . assertEquals ( 1 , ksession . fireAllRules ( ) ) |
testSkipExcluded ( ) { byte [ ] bytes = new byte [ 100 ] ; java . io . InputStream is = new com . amazonaws . util . LengthCheckInputStream ( new java . io . ByteArrayInputStream ( bytes ) , 90 , com . amazonaws . util . LengthCheckInputStream . EXCLUDE_SKIPPED_BYTES ) ; "<AssertPlaceHolder>" ; com . amazonaws . util .... | org . junit . Assert . assertTrue ( ( 10 == ( is . skip ( 10 ) ) ) ) |
testMultiplyByZeroWithoutReduction ( ) { byte [ ] abyte = new byte [ ] { ( ( byte ) ( 65 ) ) , ( ( byte ) ( 255 ) ) } ; byte [ ] bbyte = new byte [ ] { ( ( byte ) ( 0 ) ) } ; byte [ ] expectedByte = new byte [ ] { ( ( byte ) ( 0 ) ) , ( ( byte ) ( 0 ) ) , ( ( byte ) ( 0 ) ) } ; dk . alexandra . fresco . framework . uti... | org . junit . Assert . assertEquals ( expected , res ) |
testIntFunction ( ) { v8 . executeVoidScript ( "function<sp>add(x,<sp>y)<sp>{return<sp>x+y;}" ) ; com . eclipsesource . v8 . V8Array parameters = new com . eclipsesource . v8 . V8Array ( v8 ) ; parameters . push ( 7 ) ; parameters . push ( 8 ) ; int result = v8 . executeIntegerFunction ( "add" , parameters ) ; "<Assert... | org . junit . Assert . assertEquals ( 15 , result ) |
toCompilableType_A$String$List$String ( ) { org . junithelper . core . config . Configuration config = new org . junithelper . core . config . Configuration ( ) ; org . junithelper . core . extractor . TypeNameConverter target = new org . junithelper . core . extractor . TypeNameConverter ( config ) ; java . lang . Str... | org . junit . Assert . assertEquals ( expected , actual ) |
testUpdateThreadViewTriggerThreadEtagChange ( ) { org . sagebionetworks . repo . model . discussion . DiscussionThreadBundle threadBundle = threadDao . createThread ( forumId , threadId . toString ( ) , "title" , "messageKey" , userId ) ; threadDao . updateThreadView ( threadId , userId ) ; org . sagebionetworks . repo... | org . junit . Assert . assertFalse ( threadBundle . getEtag ( ) . equals ( updated . getEtag ( ) ) ) |
testBlobVar ( ) { byte [ ] [ ] vals = new byte [ ] [ ] { org . apache . hadoop . hbase . util . Bytes . toBytes ( "" ) , org . apache . hadoop . hbase . util . Bytes . toBytes ( "22" 4 ) , org . apache . hadoop . hbase . util . Bytes . toBytes ( "22" 9 ) , new byte [ ] { ( ( byte ) ( 170 ) ) , ( ( byte ) ( 170 ) ) , ( ... | org . junit . Assert . assertArrayEquals ( java . lang . String . format ( "22" 7 , java . util . Arrays . toString ( sortedVals [ i ] ) , java . util . Arrays . toString ( decoded ) , ord ) , sortedVals [ i ] , decoded ) |
testCastFunctionToString ( ) { java . lang . String result = testDialect . getSqlFrom ( org . alfasoftware . morf . sql . SqlUtils . cast ( org . alfasoftware . morf . sql . element . Function . min ( org . alfasoftware . morf . sql . SqlUtils . field ( "field" ) ) ) . asString ( 8 ) ) ; "<AssertPlaceHolder>" ; } expec... | org . junit . Assert . assertEquals ( expectedStringFunctionCast ( ) , result ) |
testSplit_4 ( ) { java . util . Set < java . util . List < java . lang . Integer > > matchers = new java . util . HashSet ( java . util . Arrays . asList ( java . util . Arrays . asList ( 67 , 112 ) , java . util . Arrays . asList ( 76 , 112 ) ) ) ; org . apache . fontbox . ttf . gsub . GlyphArraySplitter testClass = n... | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( java . util . Arrays . asList ( 94 , 167 , 112 , 91 , 103 ) ) , tokens ) |
fromInputStreams_Collection_empty ( ) { try { net . coobird . thumbnailator . Thumbnails . fromInputStreams ( java . util . Collections . < java . io . InputStream > emptyList ( ) ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . IllegalArgumentException e ) { "<AssertPlaceHolder>" ; throw e ; } } fromInput... | org . junit . Assert . assertEquals ( "Cannot<sp>specify<sp>an<sp>empty<sp>collection<sp>for<sp>InputStreams." , e . getMessage ( ) ) |
testDeadlock ( ) { payloadService . setEventHelper ( helper ) ; try { helper . addEventPayload ( "source" , "barney" , org . cytoscape . event . StubCyPayloadEvent . class ) ; java . lang . Thread . sleep ( 1100 ) ; System . out . println ( ( "deadlock<sp>payloadService<sp>num<sp>calls:" + ( payloadService . getNumCall... | org . junit . Assert . assertTrue ( ( ( payloadService . getNumCalls ( ) ) > 1 ) ) |
getOrCreateIdWithICVFailure ( ) { uid = new net . opentsdb . uid . UniqueId ( client , net . opentsdb . uid . TestUniqueId . table , net . opentsdb . uid . TestUniqueId . kind , 3 ) ; when ( client . get ( net . opentsdb . uid . TestUniqueId . anyGet ( ) ) ) . thenReturn ( com . stumbleupon . async . Deferred . < java ... | org . junit . Assert . assertArrayEquals ( id , uid . getOrCreateId ( "foo" ) ) |
getEnvironmentIsSuccessful ( ) { com . ibm . watson . discovery . v1 . model . GetEnvironmentOptions getOptions = new com . ibm . watson . discovery . v1 . model . GetEnvironmentOptions . Builder ( com . ibm . watson . discovery . v1 . DiscoveryServiceIT . environmentId ) . build ( ) ; com . ibm . watson . discovery . ... | org . junit . Assert . assertEquals ( com . ibm . watson . discovery . v1 . DiscoveryServiceIT . environmentId , getResponse . getEnvironmentId ( ) ) |
testReadWithVertexIdPredicate ( ) { java . util . List < org . gradoop . common . model . impl . pojo . Vertex > testVertices = new java . util . ArrayList ( getSocialVertices ( ) ) . subList ( 0 , 3 ) ; org . gradoop . common . model . impl . id . GradoopIdSet ids = org . gradoop . common . model . impl . id . Gradoop... | org . junit . Assert . assertTrue ( source . isFilterPushedDown ( ) ) |
XPTest ( ) { dummyMonster . setXPGain ( 1000 ) ; "<AssertPlaceHolder>" ; } getXPGain ( ) { return xpGain ; } | org . junit . Assert . assertEquals ( 1000 , dummyMonster . getXPGain ( ) ) |
testInvokeDao ( ) { org . support . project . aop . TestDao method = org . support . project . di . Container . getComp ( org . support . project . aop . TestDao . class ) ; java . lang . String result = method . test ( ) ; org . support . project . aop . IntercepterTest . LOG . info ( result ) ; "<AssertPlaceHolder>" ... | org . junit . Assert . assertEquals ( "test" , result ) |
testIsDownloadPopupRequiredHasTermsOfAccess ( ) { edu . harvard . iq . dataverse . DatasetVersion dsv1 = new edu . harvard . iq . dataverse . DatasetVersion ( ) ; dsv1 . setVersionState ( DatasetVersion . VersionState . RELEASED ) ; edu . harvard . iq . dataverse . TermsOfUseAndAccess termsOfUseAndAccess = new edu . ha... | org . junit . Assert . assertEquals ( true , edu . harvard . iq . dataverse . util . FileUtil . isDownloadPopupRequired ( dsv1 ) ) |
testDoOCR_File_With_Configs ( ) { net . sourceforge . tess4j . TesseractTest . logger . info ( "doOCR<sp>with<sp>configs" ) ; java . io . File imageFile = new java . io . File ( this . testResourcesDataPath , "eurotext.png" ) ; java . lang . String expResult = "[-0123456789.\n<sp>]+" ; java . util . List < java . lang ... | org . junit . Assert . assertTrue ( result . matches ( expResult ) ) |
whenSubmit_thenSubsequentFormRequestContainsMostRecentTodo ( ) { org . springframework . web . servlet . FlashMap flashMap = mockMvc . perform ( post ( "/sessionattributes/form" ) . param ( "description" , "newtodo" ) ) . andExpect ( status ( ) . is3xxRedirection ( ) ) . andReturn ( ) . getFlashMap ( ) ; org . springfr... | org . junit . Assert . assertEquals ( "newtodo" , item . getDescription ( ) ) |
testSubscriber ( ) { final java . util . List < java . lang . Integer > list = new java . util . ArrayList < java . lang . Integer > ( ) ; new com . github . davidmoten . rx2 . internal . flowable . FlowablePassThroughTest . FlowablePassThrough < java . lang . Integer > ( io . reactivex . Flowable . just ( 1 , 2 , 3 ) ... | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( 1 , 2 , 3 ) , list ) |
isSubQueryWithLongWithJoinWorking ( ) { if ( isBatoo ( ) ) { return ; } final java . lang . String query = "select<sp>r<sp>from<sp>RegularEntityTwo<sp>r<sp>join<sp>r.regularEntityOne<sp>one<sp>where<sp>one.id<sp>in<sp>" + "(select<sp>sub.id<sp>from<sp>RegularEntityOne<sp>sub<sp>where<sp>sub.stringAttribute<sp>=<sp>'Jus... | org . junit . Assert . assertTrue ( ( ( resultFromJPQL . size ( ) ) == 1 ) ) |
testEquals ( ) { System . out . println ( "testEquals" ) ; team . bus . model . bean . BusStop o1 = new team . bus . model . bean . BusStop ( ) . withId ( 1 ) . withName ( "a" ) ; team . bus . model . bean . BusStop o2 = new team . bus . model . bean . BusStop ( ) . withId ( 1 ) . withName ( "a" ) ; boolean result = o1... | org . junit . Assert . assertTrue ( result ) |
havingBody ( ) { final java . lang . String body = "postbody" ; net . jadler . Jadler . onRequest ( ) . havingBodyEqualTo ( body ) . havingBody ( org . hamcrest . Matchers . not ( org . hamcrest . Matchers . isEmptyOrNullString ( ) ) ) . respond ( ) . withStatus ( 201 ) ; final int status = org . apache . http . client... | org . junit . Assert . assertThat ( status , org . hamcrest . Matchers . is ( 201 ) ) |
testSetMaxCapacity_Good ( ) { com . jmethods . catatumbo . impl . LRUCache < java . lang . String , java . lang . String > cache = new com . jmethods . catatumbo . impl . LRUCache ( 2 , 5 ) ; cache . setMaxCapacity ( 20 ) ; "<AssertPlaceHolder>" ; } getMaxCapacity ( ) { return maxCapacity ; } | org . junit . Assert . assertTrue ( ( ( cache . getMaxCapacity ( ) ) == 20 ) ) |
getEmptyArchivedProcessDataInstances ( ) { final org . bonitasoft . engine . bpm . process . impl . ProcessDefinitionBuilder builder = new org . bonitasoft . engine . bpm . process . impl . ProcessDefinitionBuilder ( ) . createNewInstance ( "ProcessToArchive" , "1.0" ) ; builder . addActor ( "actor" ) ; builder . addUs... | org . junit . Assert . assertEquals ( 0 , archivedDataInstances . size ( ) ) |
shouldNotExecuteTestInAnyExcludedCategories ( ) { runner . setTestConfigurationSource ( withExcludedGroups ( org . infinitest . testrunner . exampletests . junit4 . Junit4FailingTestsWithCategories . IgnoreMe . class . getName ( ) , org . infinitest . testrunner . exampletests . junit4 . Junit4FailingTestsWithCategorie... | org . junit . Assert . assertThat ( size ( results ) , org . hamcrest . CoreMatchers . is ( 1 ) ) |
testComparatorReverse ( ) { final java . lang . String p = com . sun . mail . util . logging . CollectorFormatter . class . getName ( ) ; com . sun . mail . util . logging . Properties props = new com . sun . mail . util . logging . Properties ( ) ; props . put ( p . concat ( ".comparator" ) , com . sun . mail . util .... | org . junit . Assert . assertTrue ( result , result . startsWith ( Level . WARNING . getName ( ) ) ) |
nullMapValue ( ) { @ org . jboss . msc . value . SuppressWarnings ( "unchecked" ) org . jboss . msc . value . Value < java . util . Map < java . lang . Integer , java . lang . String > > mapValue = new org . jboss . msc . value . MapValue < java . lang . Integer , java . lang . String > ( org . jboss . msc . value . Va... | org . junit . Assert . assertNull ( mapValue . getValue ( ) ) |
name_without_spaces_is_preserved ( ) { cucumber . runtime . RuntimeOptions options = new cucumber . runtime . RuntimeOptions ( asList ( "--name" , "someName" ) ) ; java . util . regex . Pattern actualPattern = options . getNameFilters ( ) . iterator ( ) . next ( ) ; "<AssertPlaceHolder>" ; } pattern ( ) { if ( ( patter... | org . junit . Assert . assertThat ( actualPattern . pattern ( ) , org . hamcrest . CoreMatchers . is ( "someName" ) ) |
testGetMinIndexNoInput ( ) { com . twelvemonkeys . imageio . util . ImageReader reader = createReader ( ) ; int num = 0 ; try { num = reader . getMinIndex ( ) ; } catch ( java . lang . IllegalStateException ignore ) { } "<AssertPlaceHolder>" ; reader . dispose ( ) ; } createReader ( ) { return new com . twelvemonkeys .... | org . junit . Assert . assertEquals ( 0 , num ) |
testComputeTargetsSingleDomain ( ) { final java . lang . String [ ] args = new java . lang . String [ ] { com . spotify . helios . cli . CliParserTest . SUBCOMMAND , "-d" , com . spotify . helios . cli . CliParserTest . DOMAINS [ 0 ] , com . spotify . helios . cli . CliParserTest . SERVICE } ; final com . spotify . hel... | org . junit . Assert . assertEquals ( expectedTargets , targets ) |
test1 ( ) { symbolic_examples . symbolic_example_2 . NopolExample ex = new symbolic_examples . symbolic_example_2 . NopolExample ( ) ; "<AssertPlaceHolder>" ; } getMax ( int , int ) { if ( ( b - a ) < 0 ) { return b ; } return a ; } | org . junit . Assert . assertEquals ( 4 , ex . getMax ( 2 , 4 ) ) |
testCreateMedicationsSectionBuilder ( ) { org . openhealthtools . mdht . uml . cda . builder . SectionBuilder < org . openhealthtools . mdht . uml . cda . hitsp . MedicationsSection > sectionBuilder = org . openhealthtools . mdht . uml . cda . hitsp . builder . HITSPBuilderFactory . createMedicationsSectionBuilder ( ) ... | org . junit . Assert . assertNotNull ( section ) |
testEvaluateThreeIndexVarInstantiate ( ) { final org . eclipse . rdf4j . model . IRI superclass = org . apache . rya . indexing . external . AccumuloConstantPcjIT . VF . createIRI ( "SELECT<sp>?wolf<sp>?sheep<sp>?chicken<sp>" 6 ) ; final org . eclipse . rdf4j . model . IRI superclass2 = org . apache . rya . indexing . ... | org . junit . Assert . assertEquals ( crh1 . getCount ( ) , crh2 . getCount ( ) ) |
testShouldCatchTimeDesyncIfThresholdExceeded ( ) { when ( msg . isTimeCheck ( ) ) . thenReturn ( true ) ; when ( msg . getTime ( ) ) . thenReturn ( 10000L ) ; context . receiveProbe ( msg ) ; "<AssertPlaceHolder>" ; } getDesyncCount ( ) { return this . desyncCount ; } | org . junit . Assert . assertEquals ( 1 , context . getDesyncCount ( ) ) |
testSearchForExtensionTwoDeepString ( ) { ca . uhn . fhir . jpa . dao . dstu3 . SearchParameter siblingSp = new ca . uhn . fhir . jpa . dao . dstu3 . SearchParameter ( ) ; siblingSp . addBase ( "Patient" ) ; siblingSp . setCode ( "foobar" ) ; siblingSp . setType ( org . hl7 . fhir . dstu3 . model . Enumerations . Searc... | org . junit . Assert . assertThat ( foundResources , contains ( p2id . getValue ( ) ) ) |
testCoSignature ( ) { java . util . logging . Logger . getLogger ( "es.gob.afirma" ) . setLevel ( Level . WARNING ) ; final java . security . KeyStore . PrivateKeyEntry pke1 = es . gob . afirma . signers . cadestri . client . TestCAdES . loadKeyEntry ( es . gob . afirma . signers . cadestri . client . TestCAdES . CERT_... | org . junit . Assert . assertNotNull ( sign3 ) |
testCalculateDiscount ( ) { com . example . dao . ProductDAO productDAO = new com . example . dummy . ProductDAODummy ( ) ; com . example . service . ProductService productService = new com . example . service . ProductServiceImpl ( productDAO ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( productService ) |
too_many_characters ( ) { java . io . InputStream infinite = new java . io . InputStream ( ) { @ com . asakusafw . runtime . io . csv . Override public int read ( ) throws java . io . IOException { return 'a' ; } } ; com . asakusafw . runtime . io . csv . CsvConfiguration conf = createConfiguration ( ) ; try ( com . as... | org . junit . Assert . assertThat ( parser . next ( ) , is ( true ) ) |
similarity ( ) { System . out . println ( "similarity" ) ; org . aksw . limes . core . io . ls . LinkSpecification ls = new org . aksw . limes . core . io . ls . LinkSpecification ( "tmp_is_met_by(x.beginsAtDateTime|endsAtDateTime,y.b|e)" , 1.0 ) ; org . aksw . limes . core . execution . planning . planner . DynamicPla... | org . junit . Assert . assertTrue ( m . equals ( m2 ) ) |
testSSLRequired ( ) { final net . trajano . auth . HttpHeaderAuthModule module = new net . trajano . auth . HttpHeaderAuthModule ( ) ; final javax . security . auth . message . MessagePolicy mockRequestPolicy = mock ( javax . security . auth . message . MessagePolicy . class ) ; when ( mockRequestPolicy . isMandatory (... | org . junit . Assert . assertEquals ( AuthStatus . SEND_FAILURE , module . validateRequest ( messageInfo , client , null ) ) |
testLinspace2 ( ) { org . nd4j . linalg . api . ndarray . INDArray res = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 5 , 5 , DataType . DOUBLE ) ; org . nd4j . linalg . api . ndarray . INDArray exp = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 1 , 2 , 3 , 4 , 5 } ) ; "<AssertPlaceHolder>"... | org . junit . Assert . assertEquals ( exp , res ) |
testGetFooterImage ( ) { org . eclipse . swt . graphics . Image image = org . eclipse . nebula . widgets . grid . GridTestUtil . loadImage ( display , Fixture . IMAGE1 ) ; column . setFooterImage ( image ) ; "<AssertPlaceHolder>" ; } getFooterImage ( ) { checkWidget ( ) ; return footerImage ; } | org . junit . Assert . assertSame ( image , column . getFooterImage ( ) ) |
objects_isNull ( ) { boolean isNull = java . util . Objects . isNull ( null ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( isNull ) |
write_ValidImage_WriterCanCompress_HasCompressionTypeFromWriter ( ) { javax . imageio . ImageWriteParam iwParam = mock ( javax . imageio . ImageWriteParam . class ) ; javax . imageio . ImageWriter writer = mock ( javax . imageio . ImageWriter . class ) ; javax . imageio . spi . ImageWriterSpi spi = mock ( javax . image... | org . junit . Assert . assertEquals ( outputFile , sink . getSink ( ) ) |
testOffsetProducesPositiveOutput ( ) { long testValue = 549888460800L ; org . apache . hadoop . hbase . io . hfile . bucket . BucketCache . BucketEntry bucketEntry = new org . apache . hadoop . hbase . io . hfile . bucket . BucketCache . BucketEntry ( testValue , 10 , 10L , true ) ; "<AssertPlaceHolder>" ; } offset ( )... | org . junit . Assert . assertEquals ( testValue , bucketEntry . offset ( ) ) |
testEqualsWorksInHashSet ( ) { java . util . Set < org . eclipse . lyo . oslc4j . core . model . Link > setA = new java . util . HashSet < org . eclipse . lyo . oslc4j . core . model . Link > ( ) { { this . add ( new org . eclipse . lyo . oslc4j . core . model . Link ( java . net . URI . create ( org . eclipse . lyo . ... | org . junit . Assert . assertThat ( setA , org . hamcrest . CoreMatchers . equalTo ( setB ) ) |
testGetUserNamespaceAuthorization ( ) { org . finra . herd . model . api . xml . UserNamespaceAuthorizationKey key = new org . finra . herd . model . api . xml . UserNamespaceAuthorizationKey ( USER_ID , NAMESPACE ) ; org . finra . herd . model . api . xml . UserNamespaceAuthorization userNamespaceAuthorization = new o... | org . junit . Assert . assertEquals ( userNamespaceAuthorization , resultUserNamespaceAuthorization ) |
fetchInTransactionShouldNotTriggerWriteOnCommit ( ) { final java . lang . String key = "fetch" ; final byte [ ] existingContent = "hello" . getBytes ( ) ; this . cut . begin ( ) ; this . cut . write ( key , existingContent ) ; this . cut . commit ( ) ; this . cut . begin ( ) ; this . cut . fetch ( key ) ; this . cut . ... | org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( existingContent ) ) |
readerUserCanQuery ( ) { dummyLogin . login ( org . nuxeo . ecm . directory . ldap . TestInternalLDAPSessionSecurity . READER_USER ) ; java . util . Map < java . lang . String , java . io . Serializable > filter = new java . util . HashMap ( ) ; filter . put ( "lastName" , "Manager" ) ; org . nuxeo . ecm . core . api .... | org . junit . Assert . assertEquals ( 1 , entries . size ( ) ) |
readWriteStreamMemoryTweets ( ) { final java . io . InputStream stream = org . openimaj . twitter . USMFStatus . class . getResourceAsStream ( "/org/openimaj/twitter/tweets.txt" ) ; final org . openimaj . twitter . collection . TwitterStatusList < org . openimaj . twitter . USMFStatus > status = org . openimaj . twitte... | org . junit . Assert . assertTrue ( memoryLoaded . equals ( readStatus ) ) |
testGetStaticLabel ( ) { System . out . println ( "getStaticLabel" ) ; kg . apc . jmeter . vizualizers . ResponseCodesPerSecondGui instance = new kg . apc . jmeter . vizualizers . ResponseCodesPerSecondGui ( ) ; java . lang . String result = instance . getStaticLabel ( ) ; "<AssertPlaceHolder>" ; } getStaticLabel ( ) {... | org . junit . Assert . assertTrue ( ( ( result . length ( ) ) > 0 ) ) |
testSetName ( ) { java . lang . String name = "name" ; org . opencastproject . feed . impl . CategoryImplTest . instance . setName ( name ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; } | org . junit . Assert . assertEquals ( org . opencastproject . feed . impl . CategoryImplTest . instance . getName ( ) , name ) |
givenEmployeeList_andNameFilterList_thenObtainFilteredEmployeeList_usingLambdaAndHashSet ( ) { java . util . List < com . baeldung . collection . filtering . Employee > filteredList ; java . util . List < com . baeldung . collection . filtering . Employee > originalList = buildEmployeeList ( ) ; java . util . Set < jav... | org . junit . Assert . assertThat ( filteredList . size ( ) , org . hamcrest . Matchers . is ( nameFilterSet . size ( ) ) ) |
testFailures ( ) { com . arjuna . ats . internal . jta . recovery . arjunacore . XARecoveryModule xarm = new com . arjuna . ats . internal . jta . recovery . arjunacore . XARecoveryModule ( ) ; java . lang . Class < ? > [ ] parameterTypes = new java . lang . Class [ 2 ] ; com . arjuna . ats . arjuna . common . Uid u = ... | org . junit . Assert . assertEquals ( ret , u ) |
shouldGenerateNewClassIdForEachClass ( ) { final int id = sun . pitest . CodeCoverageStore . registerClass ( "Foo" ) ; final int id2 = sun . pitest . CodeCoverageStore . registerClass ( "Bar" ) ; "<AssertPlaceHolder>" ; } registerClass ( java . lang . String ) { final int id = sun . pitest . CodeCoverageStore . nextId ... | org . junit . Assert . assertFalse ( ( id == id2 ) ) |
readData_InvalidTemperatureEvent ( ) { org . mockito . Mockito . when ( filereader . fileExist ( org . mockito . Mockito . anyString ( ) ) ) . thenReturn ( true ) ; org . mockito . Mockito . when ( filereader . readAllLine ( org . mockito . Mockito . anyString ( ) ) ) . thenReturn ( new java . lang . String [ ] { "1414... | org . junit . Assert . assertEquals ( 1.0 , listTemperatureEvent . size ( ) , 0 ) |
testReconstructByDilationGrayscaleC4 ( ) { int width = 16 ; int height = 10 ; ij . process . ByteProcessor mask = new ij . process . ByteProcessor ( 16 , 10 ) ; ij . process . ByteProcessor marker = new ij . process . ByteProcessor ( 16 , 10 ) ; ij . process . ByteProcessor expected = new ij . process . ByteProcessor (... | org . junit . Assert . assertEquals ( expectedProfile [ x ] , result . get ( x , y ) ) |
testLoadComponentRegister ( ) { com . hazelcast . simulator . utils . FileUtils . writeText ( "192.168.1.1,10.10.10.10" , agentsFile ) ; registry = com . hazelcast . simulator . utils . SimulatorUtils . loadComponentRegister ( agentsFile ) ; "<AssertPlaceHolder>" ; } agentCount ( ) { return agents . size ( ) ; } | org . junit . Assert . assertEquals ( 1 , registry . agentCount ( ) ) |
testDeserializeStringToUnsignedLong ( ) { long expected = java . lang . Long . parseUnsignedLong ( "9223372036854775808" ) ; long result = getMapper ( ) . readValue ( "{\"unsignedLong\":\"9223372036854775808\"}" , discord4j . common . json . UnsignedLongPojo . class ) . unsignedLong ; "<AssertPlaceHolder>" ; } getMappe... | org . junit . Assert . assertEquals ( expected , result ) |
testCopyFromArrowToCsv ( ) { lombok . val recordsPair = records ( ) ; java . nio . file . Path p = java . nio . file . Files . createTempFile ( "arrowwritetest" , ".arrow" ) ; org . apache . commons . io . FileUtils . write ( p . toFile ( ) , recordsPair . getFirst ( ) ) ; p . toFile ( ) . deleteOnExit ( ) ; org . data... | org . junit . Assert . assertEquals ( 10 , loadedCSvRecords . size ( ) ) |
testMaxContentLengthIgnoredForTitle ( ) { java . lang . String title = com . liferay . portal . kernel . test . util . RandomTestUtil . randomString ( 8 ) ; _summaryBuilder . setTitle ( title ) ; _summaryBuilder . setMaxContentLength ( 1 ) ; com . liferay . portal . search . summary . Summary summary = _summaryBuilder ... | org . junit . Assert . assertEquals ( title , summary . getTitle ( ) ) |
selectExistentUnselectablePartTest ( ) { final org . uberfire . workbench . model . PartDefinition part = getPartDefinition ( false , true ) ; final boolean selected = listBar . selectPart ( part ) ; "<AssertPlaceHolder>" ; verify ( listBar . titleDropDown , never ( ) ) . selectPart ( part ) ; verify ( listBar , never ... | org . junit . Assert . assertTrue ( selected ) |
dateType ( ) { com . querydsl . core . types . dsl . CaseForEqBuilderTest . Customer c = alias ( com . querydsl . core . types . dsl . CaseForEqBuilderTest . Customer . class , "customer" ) ; com . querydsl . core . types . dsl . DateExpression < java . sql . Date > cases = $ ( c . getAnnualSpending ( ) ) . when ( 1000... | org . junit . Assert . assertNotNull ( cases ) |
workingTreeShouldBeLessThanCacheTree ( ) { org . eclipse . jface . viewers . Viewer viewer = mock ( org . eclipse . jface . viewers . Viewer . class ) ; org . eclipse . egit . ui . internal . synchronize . mapping . GitChangeSetSorter sorter = new org . eclipse . egit . ui . internal . synchronize . mapping . GitChange... | org . junit . Assert . assertTrue ( ( actual < 0 ) ) |
testBytes2Long ( ) { long [ ] testVals = new long [ ] { Long . MIN_VALUE , - 1 , 0 , 1 , Long . MAX_VALUE } ; for ( long testVal : testVals ) { byte [ ] convertedBytes = com . tc . util . Conversion . long2Bytes ( testVal ) ; "<AssertPlaceHolder>" ; } } bytes2Long ( byte [ ] ) { return com . tc . util . Conversion . by... | org . junit . Assert . assertTrue ( ( testVal == ( com . tc . util . Conversion . bytes2Long ( convertedBytes ) ) ) ) |
byRunId ( ) { java . util . List < org . estatio . module . lease . dom . invoicing . InvoiceForLease > result = invoiceForLeaseRepository . findInvoicesByRunId ( org . estatio . module . lease . integtests . invoicing . InvoiceRepository_IntegTest . FindInvoiceRepositoryByRunId . runId ) ; "<AssertPlaceHolder>" ; } si... | org . junit . Assert . assertThat ( result . size ( ) , org . hamcrest . CoreMatchers . is ( 1 ) ) |
testGetScriptEngineFactory ( ) { de . mirkosertic . gameengine . event . GameEventManager theEventManager = mock ( de . mirkosertic . gameengine . event . GameEventManager . class ) ; de . mirkosertic . gameengine . core . GameResourceLoader theResourceLoader = mock ( de . mirkosertic . gameengine . core . GameResource... | org . junit . Assert . assertSame ( theScriptEngineFactory , theRuntime . getScriptEngineFactory ( ) ) |
checkResourceConstraintsNormal ( ) { final java . lang . String contextId = "test#context#Id" ; final java . lang . String uriName = "/context/index.html" ; final java . lang . String methodName = "POST" ; final java . lang . String [ ] mna = new java . lang . String [ ] { methodName } ; final java . security . Princip... | org . junit . Assert . assertFalse ( wsv . checkResourceConstraints ( contextId , req , webPerm , subject ) ) |
testCastCharToShort ( ) { int expected = org . stjs . generator . exec . ints . CharToShort . method ( CharToShort . BIG_CHAR ) ; double expectedDouble = ( ( double ) ( expected ) ) ; "<AssertPlaceHolder>" ; } executeAndReturnNumber ( java . lang . Class ) { return executeAndReturnNumber ( clazz , null ) ; } | org . junit . Assert . assertEquals ( expectedDouble , executeAndReturnNumber ( org . stjs . generator . exec . ints . CharToShort . class ) , 0 ) |
testNoParamMethod ( ) { com . outbrain . ob1k . server . Server server = null ; com . outbrain . ob1k . server . services . SimpleTestService client = null ; try { server = com . outbrain . ob1k . server . BasicServerRpcTest . buildServer ( null ) ; final int port = server . start ( ) . getPort ( ) ; client = buildClie... | org . junit . Assert . assertTrue ( ( nextNum != null ) ) |
convertStringToPropertiesTest ( ) { java . lang . String propsStr = "prop1=valA:prop2=valB:prop3=valC" ; java . util . Properties propsExpected = new java . util . Properties ( ) ; propsExpected . put ( "prop1" , "valA" ) ; propsExpected . put ( "prop2" , "valB" ) ; propsExpected . put ( "prop3" , "valC" ) ; java . uti... | org . junit . Assert . assertEquals ( propsExpected , propsActual ) |
testGetInUserCount ( ) { System . out . println ( "getInUserCount" ) ; kg . apc . jmeter . threads . SteppingThreadGroup instance = new kg . apc . jmeter . threads . SteppingThreadGroup ( ) ; java . lang . String expResult = "" ; java . lang . String result = instance . getInUserCount ( ) ; "<AssertPlaceHolder>" ; } ge... | org . junit . Assert . assertEquals ( expResult , result ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.