input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
test ( ) { org . cache2k . benchmark . util . ScrambledZipfianPattern g = new org . cache2k . benchmark . util . ScrambledZipfianPattern ( 123 , 900 ) ; java . util . Set < java . lang . Long > uniqueVals = new java . util . HashSet ( ) ; for ( int i = 0 ; i < 10000 ; i ++ ) { uniqueVals . add ( g . nextLong ( ) ) ; } ... | org . junit . Assert . assertEquals ( 900 , uniqueVals . size ( ) ) |
groupTest ( ) { org . hawkular . alerts . api . model . trigger . Trigger groupTrigger = new org . hawkular . alerts . api . model . trigger . Trigger ( "groupTrigger0" , "groupTrigger0" ) ; groupTrigger . setType ( TriggerType . GROUP ) ; definitions . addGroupTrigger ( "tenant0" , groupTrigger ) ; org . hawkular . al... | org . junit . Assert . assertEquals ( 1 , definitions . getMemberTriggers ( "tenant0" , "groupTrigger0" , true ) . size ( ) ) |
ensureInterceptorCountIsConstant ( ) { gov . hhs . fha . nhinc . messaging . client . CONNECTClient < gov . hhs . fha . nhinc . messaging . service . port . TestServicePortType > client = createClient ( ) ; org . apache . cxf . endpoint . Client cxfClient = org . apache . cxf . frontend . ClientProxy . getClient ( clie... | org . junit . Assert . assertEquals ( numOutInterceptors , cxfClient2 . getOutInterceptors ( ) . size ( ) ) |
snapshotWriteToOutputStream ( ) { okio . ByteString byteString = concatenateBuffers ( okio . SegmentSharingTest . xs , okio . SegmentSharingTest . ys , okio . SegmentSharingTest . zs ) . snapshot ( ) ; okio . Buffer out = new okio . Buffer ( ) ; byteString . write ( out . outputStream ( ) ) ; "<AssertPlaceHolder>" ; } ... | org . junit . Assert . assertEquals ( ( ( ( okio . SegmentSharingTest . xs ) + ( okio . SegmentSharingTest . ys ) ) + ( okio . SegmentSharingTest . zs ) ) , out . readUtf8 ( ) ) |
retrieveAllRegistrations ( ) { registrationBC . removeAll ( ) ; de . mpg . imeji . logic . vo . User user1 = new de . mpg . imeji . logic . vo . User ( ) ; user1 . setEmail ( "retrieve-all-1@example.org" ) ; user1 . setPerson ( de . mpg . imeji . logic . controller . util . ImejiFactory . newPerson ( "test" , "user" , ... | org . junit . Assert . assertEquals ( registrationBC . retrieveAll ( ) . size ( ) , 2 ) |
testRecodeFunction ( ) { final java . util . Map < java . lang . String , java . lang . String > VALUE_MAP = new java . util . HashMap < java . lang . String , java . lang . String > ( ) { { put ( "sc.1" , "a" ) ; put ( "sc.2" , "b" ) ; put ( "sc.3" , "c" ) ; } } ; org . geotools . feature . FeatureIterator < org . ope... | org . junit . Assert . assertEquals ( recodedName , value ) |
testIntegerMethodCalledFromScriptWithResult ( ) { com . eclipsesource . v8 . V8CallbackTest . ICallback callback = mock ( com . eclipsesource . v8 . V8CallbackTest . ICallback . class ) ; doReturn ( 8 ) . when ( callback ) . integerMethod ( ) ; v8 . registerJavaMethod ( callback , "integerMethod" , "foo" , new java . l... | org . junit . Assert . assertEquals ( 8 , result ) |
getValidReport ( ) { java . lang . String xml = null ; org . entando . entando . aps . system . init . model . DataSourceDumpReport report = new org . entando . entando . aps . system . init . model . DataSourceDumpReport ( xml ) ; when ( databaseManager . getBackupReport ( org . mockito . ArgumentMatchers . anyString ... | org . junit . Assert . assertNotNull ( dto ) |
isInternalAuthMode ( ) { when ( mock . getVOConfigurationSetting ( eq ( ConfigurationKey . AUTH_MODE ) , anyString ( ) ) ) . thenReturn ( createSetting ( ConfigurationKey . AUTH_MODE , "INTERNAL" ) ) ; boolean isInternalAuthMode = bean . isInternalAuthMode ( ) ; "<AssertPlaceHolder>" ; } isInternalAuthMode ( ) { when (... | org . junit . Assert . assertTrue ( isInternalAuthMode ) |
CollisionWithMergeInlineAbove1RemoveOneCollisonNode ( ) { io . usethesource . capsule . SetSmokeTest . DummyValue hash98304_obj1 = new io . usethesource . capsule . SetSmokeTest . DummyValue ( 1 , 98304 ) ; io . usethesource . capsule . SetSmokeTest . DummyValue hash98304_obj2 = new io . usethesource . capsule . SetSmo... | org . junit . Assert . assertEquals ( xs , ys ) |
test_empty ( ) { java . util . List < java . util . List < java . lang . Integer > > actual = t . threeSum ( new int [ ] { } ) ; "<AssertPlaceHolder>" ; } threeSum ( int [ ] ) { if ( ( num == null ) || ( ( num . length ) == 0 ) ) { return java . util . Collections . emptyList ( ) ; } java . util . List < java . util . ... | org . junit . Assert . assertEquals ( 0 , actual . size ( ) ) |
testSbumit2 ( ) { com . crazymouse . entity . Submit s = new com . crazymouse . entity . Submit ( Constants . PROTOCALTYPE_VERSION_CMPP2 ) ; processCommon ( s ) ; r . nextBytes ( s . getFeeTerminalId ( ) ) ; r . nextBytes ( s . getDestTerminalIds ( ) ) ; r . nextBytes ( s . getReserveOrLinkId ( ) ) ; com . crazymouse .... | org . junit . Assert . assertEquals ( s , s1 ) |
testGetStyleForMetacardBySourceId ( ) { ddf . catalog . data . Metacard metacard = new org . codice . ddf . spatial . kml . transformer . MockMetacard ( null , null ) ; org . codice . ddf . spatial . kml . transformer . KmlStyleMap mapper = new org . codice . ddf . spatial . kml . transformer . KmlStyleMap ( ) ; mapper... | org . junit . Assert . assertThat ( mapper . getStyleForMetacard ( metacard ) , org . hamcrest . Matchers . is ( org . codice . ddf . spatial . kml . transformer . TestKmlStyleMap . DEFAULT_STYLE_URL ) ) |
testGetCsvData ( ) { final java . lang . String TEST = "\"This<sp>is<sp>a<sp>test\",<sp>laughs<sp>Kunal.\n\r" ; org . jumpmind . symmetric . io . data . CsvData data = new org . jumpmind . symmetric . io . data . CsvData ( org . jumpmind . symmetric . io . data . DataEventType . INSERT , new java . lang . String [ ] { ... | org . junit . Assert . assertEquals ( TEST , result ) |
testWriteThroughCache ( ) { org . atlasapi . media . entity . Brand brand = org . atlasapi . media . entity . testing . BrandTestDataBuilder . brand ( ) . build ( ) ; brand . setCanonicalUri ( "http://brand.com" ) ; org . atlasapi . media . entity . Item item = org . atlasapi . media . entity . testing . ComplexItemTes... | org . junit . Assert . assertEquals ( item , queried ) |
withZeroStep ( ) { "<AssertPlaceHolder>" ; } countWays ( int ) { if ( steps == 0 ) return 1 ; else if ( steps == 1 ) return 1 ; else if ( steps == 2 ) return 2 ; else if ( steps == 3 ) return 4 ; int a = 1 ; int b = 2 ; int c = 4 ; int ways = 0 ; for ( int i = 4 ; i <= steps ; i ++ ) { ways = ( a + b ) + c ; a = b ; b ... | org . junit . Assert . assertEquals ( 1 , s . countWays ( 0 ) ) |
testDependsOn ( ) { org . jboss . as . test . integration . ejb . singleton . dependson . CallCounterSingleton singleton = ( ( org . jboss . as . test . integration . ejb . singleton . dependson . CallCounterSingleton ) ( ctx . lookup ( "java:module/CallCounterSingleton" ) ) ) ; deployer . deploy ( "ear" ) ; deployer .... | org . junit . Assert . assertEquals ( expectedOrder , singleton . getCalls ( ) ) |
testReadFromISO ( ) { java . lang . String eWithAcute = "é" ; java . lang . String nameStringUTF16 = ( "F" + eWithAcute ) + "lix" ; java . lang . String bookStringUTF16 = ( ( "<?xml<sp>version=\"1.0\"<sp>encoding=\"ISO-8859-1\"?>" + "<Book><name>" ) + nameStringUTF16 ) + "</name></Book>" ; byte [ ] iso88591bytes = book... | org . junit . Assert . assertEquals ( book . getName ( ) , nameStringUTF16 ) |
testClientThree ( ) { org . glassfish . tyrus . server . Server server = startServer ( org . glassfish . tyrus . test . standard_config . MaxMessageSizeTest . Endpoint1 . class , org . glassfish . tyrus . test . standard_config . MaxMessageSizeTest . ServiceEndpoint . class ) ; try { org . glassfish . tyrus . client . ... | org . junit . Assert . assertEquals ( 0 , org . glassfish . tyrus . test . standard_config . MaxMessageSizeTest . MyClientEndpoint . latch . getCount ( ) ) |
testModificationIterator ( ) { me . prettyprint . hector . api . mutation . Mutator mutator = me . prettyprint . hector . api . factory . HFactory . createMutator ( keyspace , me . prettyprint . cassandra . service . ColumnSliceIteratorTest . se ) ; me . prettyprint . hector . api . query . SliceQuery < java . lang . S... | org . junit . Assert . assertEquals ( 1000 , results . size ( ) ) |
testGetGE ( ) { java . lang . String actual = table . getGE ( ) ; java . lang . String expected = ">=" ; "<AssertPlaceHolder>" ; } getGE ( ) { return ">=" ; } | org . junit . Assert . assertEquals ( expected , actual ) |
testCanSerialiseEdge ( ) { final uk . gov . gchq . gaffer . data . element . Edge edge = new uk . gov . gchq . gaffer . data . element . Edge . Builder ( ) . group ( TestGroups . EDGE ) . source ( "source" ) . dest ( "destination" ) . directed ( true ) . build ( ) ; final byte [ ] serialisedEdge = serialiser . serialis... | org . junit . Assert . assertEquals ( edge , deserialisedEdge ) |
testInject ( ) { org . teiid . adminapi . impl . VDBTranslatorMetaData tm = new org . teiid . adminapi . impl . VDBTranslatorMetaData ( ) ; tm . setExecutionFactoryClass ( org . teiid . deployers . TestTranslatorUtil . MyTranslator . class ) ; tm . addProperty ( "MyProperty" , "correctly-assigned" ) ; org . teiid . dep... | org . junit . Assert . assertEquals ( "correctly-assigned" , my . getMyProperty ( ) ) |
testVerwerkBerichtIndienExceptionBijLockStapOntgrendel ( ) { final nl . bzk . brp . model . bijhouding . BijhoudingsBericht bijhoudingsBericht = maakNieuwStandaardBericht ( null , maakStandaardActie ( ) ) ; doThrow ( new java . lang . NullPointerException ( "fout<sp>bij<sp>unlock" ) ) . when ( lockStap ) . ontgrendel (... | org . junit . Assert . assertEquals ( 1 , bijhoudingResultaat . getMeldingen ( ) . size ( ) ) |
testGetUnmarshaller ( ) { com . betfair . cougar . marshalling . api . databinding . UnMarshaller marshaller = factory . getUnMarshaller ( ) ; marshaller . unmarshall ( null , ( ( java . lang . Class ) ( null ) ) , null , false ) ; "<AssertPlaceHolder>" ; expectUnMarshall ( ) ; } getUnMarshaller ( ) { return unMarshall... | org . junit . Assert . assertSame ( marshaller , factory . getUnMarshaller ( ) ) |
exceptionExecutingPolicy ( ) { java . util . Map < java . lang . String , java . lang . String > props = new java . util . HashMap ( taskConfig ) ; task . start ( props ) ; com . github . mmolimar . kafka . connect . fs . policy . Policy policy = org . easymock . EasyMock . createNiceMock ( com . github . mmolimar . ka... | org . junit . Assert . assertEquals ( 0 , task . poll ( ) . size ( ) ) |
testAddCustomProperty ( ) { final java . lang . String customKey = "string" ; final java . lang . String customValue = "Hello" ; this . builder . addCustomProperty ( customKey , customValue ) ; @ com . turo . pushy . apns . util . SuppressWarnings ( "unchecked" ) final java . util . Map < java . lang . String , java . ... | org . junit . Assert . assertEquals ( customValue , payload . get ( customKey ) ) |
update ( ) { java . lang . String propName = java . util . UUID . randomUUID ( ) . toString ( ) ; java . lang . Integer value = new java . util . Random ( ) . nextInt ( ) ; config . setProperty ( propName , value ) ; config . update ( ) ; "<AssertPlaceHolder>" ; } getInteger ( java . lang . String ) { java . lang . Str... | org . junit . Assert . assertEquals ( value , config . getInteger ( propName ) ) |
testSerilizationConfig ( ) { com . gs . fw . common . mithra . util . serializer . SerializationConfig serializationConfig = com . gs . fw . common . mithra . util . serializer . SerializationConfig . shallowWithDefaultAttributes ( com . gs . fw . common . mithra . test . domain . OrderFinder . getFinderInstance ( ) ) ... | org . junit . Assert . assertFalse ( serializationConfig . serializeMetaData ( ) ) |
testI2os_ByteArray_lengthMatchingOctetString ( ) { byte [ ] bigInt = new byte [ ] { ( ( byte ) ( 0 ) ) , ( ( byte ) ( 0 ) ) , ( ( byte ) ( 0 ) ) , ( ( byte ) ( 42 ) ) } ; byte [ ] expectedResult = new byte [ ] { ( ( byte ) ( 0 ) ) , ( ( byte ) ( 0 ) ) , ( ( byte ) ( 0 ) ) , ( ( byte ) ( 42 ) ) } ; byte [ ] result = de ... | org . junit . Assert . assertArrayEquals ( expectedResult , result ) |
testGetKeys ( ) { org . apache . directory . server . core . avltree . AvlTree < java . lang . Integer > tree = createTree ( ) ; tree . insert ( 72 ) ; tree . insert ( 79 ) ; tree . insert ( 1 ) ; tree . insert ( 2 ) ; tree . insert ( 3 ) ; tree . insert ( 7 ) ; tree . insert ( 34 ) ; "<AssertPlaceHolder>" ; } getKeys ... | org . junit . Assert . assertTrue ( ( 7 == ( tree . getKeys ( ) . size ( ) ) ) ) |
testBooleanComparison ( ) { final org . drools . modelcompiler . builder . generator . TypedExpression expected = typedResult ( "_this.getAge()<sp>==<sp>18" , int . class ) ; final org . drools . modelcompiler . builder . generator . TypedExpression actual = toTypedExpression ( "age<sp>==<sp>18" , org . drools . modelc... | org . junit . Assert . assertEquals ( expected , actual ) |
testConcatStringAndChar ( ) { java . lang . String expected = org . stjs . generator . exec . ints . CharPlusString . method ( "hello" , CharPlusString . CYRILLIC_IA ) ; "<AssertPlaceHolder>" ; } execute ( org . stjs . javascript . functions . Callback0 ) { } | org . junit . Assert . assertEquals ( expected , execute ( org . stjs . generator . exec . ints . CharPlusString . class ) ) |
testVerwerkBerichtIndienExceptionBijLockStapVergrendel ( ) { final nl . bzk . brp . model . bijhouding . BijhoudingsBericht bijhoudingsBericht = maakNieuwStandaardBericht ( null , maakStandaardActie ( ) ) ; doThrow ( new java . lang . NullPointerException ( "fout<sp>bij<sp>lock" ) ) . when ( lockStap ) . vergrendel ( a... | org . junit . Assert . assertEquals ( 1 , bijhoudingResultaat . getMeldingen ( ) . size ( ) ) |
testCHEMBL529226 ( ) { java . lang . String smiles = "CC1=CN([C@@H]2O[C@@]3(COP(=S)(O)O[C@H]4[C@H]5OC[C@]4(COP(=S)(O)O[C@H]6C[C@@H](O[C@@H]6COP(=S)(O)O[C@H]7[C@@H](O)[C@@H](O[C@@H]7COP(=S)(O)O[C@H]8[C@@H](O)[C@@H](O[C@@H]8COP(=S)(O)O[C@H]9[C@@H](O)[C@@H](O[C@@H]9COP(=S)(O)O[C@H]%10[C@@H](O)[C@@H](O[C@@H]%10COP(=S)(O)O[... | org . junit . Assert . assertThat ( fragmenter . getFrameworks ( ) . length , org . hamcrest . CoreMatchers . is ( 1 ) ) |
testGetJoinedProjectTokenNullToken ( ) { when ( pluginSettings . get ( ( ( ( ".jenkinsUser." + ( com . kylenicholls . stash . parameterizedbuilds . ciserver . JenkinsTest . USER_SLUG ) ) + "." ) + ( com . kylenicholls . stash . parameterizedbuilds . ciserver . JenkinsTest . PROJECT_KEY ) ) ) ) . thenReturn ( null ) ; j... | org . junit . Assert . assertEquals ( null , actual ) |
nullShouldBeReturnedWhenNoRuntimeHasBeenRegisteredForDatabase ( ) { "<AssertPlaceHolder>" ; } getRuntime ( org . neo4j . graphdb . GraphDatabaseService ) { return com . graphaware . runtime . RuntimeRegistry . RUNTIMES . get ( com . graphaware . runtime . RuntimeRegistry . storeDir ( database ) ) ; } | org . junit . Assert . assertNull ( com . graphaware . runtime . RuntimeRegistry . getRuntime ( database ) ) |
testValidateState_nullManager_assertIllegalStateException ( ) { org . nhindirect . monitor . dao . impl . NotificationDuplicationDAOImpl impl = new org . nhindirect . monitor . dao . impl . NotificationDuplicationDAOImpl ( ) ; boolean exceptionOccured = false ; try { impl . validateState ( ) ; } catch ( java . lang . I... | org . junit . Assert . assertTrue ( exceptionOccured ) |
testFieldErrorHandlingOnResultSet ( ) { @ org . simpleflatmapper . jdbc . test . SuppressWarnings ( "unchecked" ) org . simpleflatmapper . map . FieldMapperErrorHandler < org . simpleflatmapper . jdbc . JdbcColumnKey > fieldMapperErrorHandler = mock ( org . simpleflatmapper . map . FieldMapperErrorHandler . class ) ; o... | org . junit . Assert . assertNotNull ( list . get ( 0 ) ) |
shouldNotCleanupPodBeforeNonDeletePeriod ( ) { final java . lang . String name = createdPod . getMetadata ( ) . getName ( ) ; when ( k8sClient . pods ( ) . withName ( name ) ) . thenReturn ( namedPod ) ; when ( namedPod . get ( ) ) . thenReturn ( createdPod ) ; createdPod . setStatus ( podStatus ) ; when ( podStatus . ... | org . junit . Assert . assertThat ( shouldDelete , org . hamcrest . Matchers . is ( false ) ) |
testGetTableStatusOrCreateIfNotExistsProcessingExpired ( ) { status . setState ( TableState . PROCESSING ) ; when ( mockTableStatusDAO . getTableStatus ( tableId ) ) . thenReturn ( status ) ; when ( mockTableIndexDAO . doesIndexStateMatch ( anyString ( ) , anyLong ( ) , anyString ( ) ) ) . thenReturn ( true ) ; when ( ... | org . junit . Assert . assertNotNull ( result ) |
test_WithValueMismatch ( ) { ctx . request ( ) . addHeader ( "myHeader" , "bar" ) ; extension . activate ( configWithRequestHeaderValues ) ; boolean actual = extension . accepts ( ctx . request ( ) , null , extension . getAllowedKeyValues ( ) ) ; "<AssertPlaceHolder>" ; } activate ( java . util . Map ) { this . listRoo... | org . junit . Assert . assertFalse ( actual ) |
testTwoTxs ( ) { doReturn ( java . util . Arrays . asList ( new java . lang . Object [ ] { java . util . Arrays . asList ( new java . lang . Object [ ] { barBytes } ) , java . util . Arrays . asList ( new java . lang . Object [ ] { fooBytes } ) } ) ) . when ( nativeConnection ) . closePipeline ( ) ; connection . get ( ... | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( new java . lang . Object [ ] { java . util . Arrays . asList ( new java . lang . Object [ ] { bar } ) , java . util . Arrays . asList ( new java . lang . Object [ ] { foo } ) } ) , results ) |
testBatchInsertCheckForData ( ) { int [ ] res ; java . util . List < com . ctrip . platform . dal . dao . unitbase . ClientTestModel > modelList = null ; try { res = dao . batchInsert ( new com . ctrip . platform . dal . dao . unittests . DalHints ( ) , modelList ) ; org . junit . Assert . fail ( ) ; } catch ( java . l... | org . junit . Assert . assertArrayEquals ( new int [ 0 ] , res ) |
testSplitPath ( ) { java . lang . String [ ] expectedResult = new java . lang . String [ ] { "C:" , "Users" , "John" , "Image.jpg" } ; java . lang . String sep = java . io . File . separator ; java . lang . String [ ] actualResult = info . michaelkohler . helpertools . io . FileHelper . splitPath ( ( ( ( ( ( ( "C:" + s... | org . junit . Assert . assertEquals ( expectedResult [ i ] , actualResult [ i ] ) |
getInstanceHashCode ( ) { "<AssertPlaceHolder>" ; } getInstance ( ) { for ( java . nio . file . spi . FileSystemProvider provider : java . nio . file . spi . FileSystemProvider . installedProviders ( ) ) { if ( provider instanceof org . apache . taverna . robundle . fs . BundleFileSystemProvider ) { return ( ( org . ap... | org . junit . Assert . assertEquals ( org . apache . taverna . robundle . fs . BundleFileSystemProvider . getInstance ( ) . hashCode ( ) , new org . apache . taverna . robundle . fs . BundleFileSystemProvider ( ) . hashCode ( ) ) |
withoutClassloader ( ) { final org . eclipse . smarthome . core . storage . Storage < java . lang . String > storageWithoutClassloader = storageService . getStorage ( "storageWithoutClassloader" ) ; final java . lang . String value = "Value" ; storageWithoutClassloader . put ( org . eclipse . smarthome . storage . mapd... | org . junit . Assert . assertEquals ( value , storageWithoutClassloader . get ( org . eclipse . smarthome . storage . mapdb . internal . StorageServiceOSGiTest . KEY_1 ) ) |
testAllMethodsImplemented ( ) { for ( java . lang . reflect . Method method : org . eclipse . aether . RepositorySystemSession . class . getMethods ( ) ) { java . lang . reflect . Method m = org . eclipse . aether . AbstractForwardingRepositorySystemSession . class . getDeclaredMethod ( method . getName ( ) , method . ... | org . junit . Assert . assertNotNull ( method . toString ( ) , m ) |
publishToken ( ) { java . lang . String bearer = sut . publishToken ( server , new scouterx . webapp . model . scouter . SUser ( vutUserId ) ) ; scouterx . webapp . framework . session . UserToken fromBearer = scouterx . webapp . framework . session . UserToken . fromBearerToken ( bearer ) ; "<AssertPlaceHolder>" ; } g... | org . junit . Assert . assertEquals ( vutUserId , fromBearer . getUserId ( ) ) |
ASIPMessage_CompareInToOutMessageRawByteArray_success ( ) { java . lang . String rawInput = "Hello<sp>ASIP." ; net . sharkfw . asip . engine . ASIPOutMessage outMessage = new net . sharkfw . asip . engine . ASIPOutMessage ( this . engine , this . connection , 10 , sender , sender , receiverPeer , null , null , null , n... | org . junit . Assert . assertEquals ( rawInput , text ) |
shouldRaiseConstraintViolationCausePriceLow ( ) { javax . validation . executable . ExecutableValidator methodValidator = org . agoncal . book . javaee7 . chapter03 . ex03 . Book03Test . validator . forExecutables ( ) ; java . lang . reflect . Constructor < org . agoncal . book . javaee7 . chapter03 . ex03 . Book03 > c... | org . junit . Assert . assertEquals ( 1 , violations . size ( ) ) |
statusNotificationVerifyResponse ( ) { io . motown . ocpp . v15 . soap . centralsystem . StatusNotificationRequest request = new io . motown . ocpp . v15 . soap . centralsystem . StatusNotificationRequest ( ) ; request . setStatus ( ChargePointStatus . AVAILABLE ) ; io . motown . ocpp . v15 . soap . centralsystem . Sta... | org . junit . Assert . assertNotNull ( response ) |
testTooManyTagsForLocale ( ) { setupTagData ( ) ; final long tagObjectKey = 864238476 ; final java . lang . String [ ] newTagValues = new java . lang . String [ ] { "q" , "w" , "e" , "r" , "t" } ; try { runTX ( new java . util . concurrent . Callable < java . lang . Void > ( ) { @ org . oscm . serviceprovisioningservic... | org . junit . Assert . assertEquals ( newTagValues [ i ] , tagValues [ i ] ) |
testParseNullSafeFieldAccessExpr ( ) { java . lang . String expr = "person!.name<sp>==<sp>\"Mark\"" ; com . github . javaparser . ast . expr . Expression expression = org . drools . constraint . parser . DrlxParser . parseExpression ( parser , expr ) . getExpr ( ) ; "<AssertPlaceHolder>" ; } printConstraint ( com . git... | org . junit . Assert . assertEquals ( expr , printConstraint ( expression ) ) |
testUnsubscribeEventsAndConfirmEventsNoLongerFire ( ) { com . google . firebase . database . DatabaseReference ref = com . google . firebase . testing . IntegrationTestUtils . getRandomNode ( com . google . firebase . database . integration . EventTestIT . masterApp ) ; final java . util . concurrent . atomic . AtomicI... | org . junit . Assert . assertEquals ( 3 , callbackCount . get ( ) ) |
testCompareGelijkHogereId ( ) { final nl . bzk . brp . model . operationeel . kern . HisPersoonAfgeleidAdministratiefModel afgAdm1 = maakHisPersoonAfgeleidAdministratiefModel ( 345 , new nl . bzk . brp . model . algemeen . attribuuttype . kern . DatumTijdAttribuut ( nl . bzk . brp . model . algemeen . attribuuttype . k... | org . junit . Assert . assertEquals ( 1 , resultaat ) |
testHandleMessageRegisteredCollectorForTopic ( ) { io . github . tcdl . msb . api . message . Message originalAndReceivedMessage = io . github . tcdl . msb . support . TestUtils . createSimpleRequestMessage ( io . github . tcdl . msb . collector . CollectorManagerTest . TOPIC ) ; when ( collectorMock . getRequestMessag... | org . junit . Assert . assertEquals ( resolved . get ( ) , collectorMock ) |
testPutAndRemoveOnNoMergeTreeWithCollapse ( ) { com . sun . sgs . test . app . util . TestScalableHashMap . txnScheduler . runTask ( new com . sun . sgs . test . util . TestAbstractKernelRunnable ( ) { public void run ( ) throws com . sun . sgs . test . app . util . Exception { java . util . Map < java . lang . Integer... | org . junit . Assert . assertEquals ( control , test ) |
testReifyDirectoryResourceFailsIfFileExists ( ) { java . io . File tempFile = java . io . File . createTempFile ( "forge" , "testReifyDirectoryResourceFailsIfFileExists" ) ; tempFile . deleteOnExit ( ) ; org . jboss . forge . addon . resource . DirectoryResource reified = factory . create ( tempFile ) . reify ( org . j... | org . junit . Assert . assertNull ( reified ) |
testModifyTicketRemoveHostEmptyHost ( ) { org . irods . jargon . ticket . packinstr . TicketAdminInp pi = org . irods . jargon . ticket . packinstr . TicketAdminInp . instanceForModifyRemoveAccess ( ticketId , TicketModifyAddOrRemoveTypeEnum . TICKET_MODIFY_HOST , "" ) ; "<AssertPlaceHolder>" ; } instanceForModifyRemov... | org . junit . Assert . assertNotNull ( pi ) |
testFunctionDependingOnInputWithFunctionHierarchy ( ) { org . apache . flink . api . java . typeutils . TypeExtractorTest . IdentityMapper4 < java . lang . String > function = new org . apache . flink . api . java . typeutils . TypeExtractorTest . IdentityMapper4 < java . lang . String > ( ) ; org . apache . flink . ap... | org . junit . Assert . assertEquals ( BasicTypeInfo . STRING_TYPE_INFO , ti ) |
testPausedAccumulate ( ) { io . nats . client . impl . MessageQueue q = new io . nats . client . impl . MessageQueue ( true ) ; q . pause ( ) ; io . nats . client . impl . NatsMessage msg = q . accumulate ( 1 , 1 , null ) ; "<AssertPlaceHolder>" ; } accumulate ( long , long , java . time . Duration ) { if ( ! ( this . ... | org . junit . Assert . assertNull ( msg ) |
testErrorIDGenerator_blocksize ( ) { boolean deleteLibraryFlag = deleteTypeLibrary ( org . ebayopensource . turmeric . tools . errorlibrary . ErrorIdGeneratorTests . MARKET_PLACES_STORE_LOCATION , ( ( org . ebayopensource . turmeric . tools . errorlibrary . ErrorIdGeneratorTests . MARKET_PLACES_ORG_NAME ) + 1 ) ) ; boo... | org . junit . Assert . assertEquals ( isillegalArgumentException , false ) |
testGetBytesWithPicos ( ) { int tag = new java . util . Random ( ) . nextInt ( ) ; byte [ ] bytes = fixio . fixprotocol . fields . UTCTimeOnlyFieldTest . TIMESTAMP_WITH_PICOS . getBytes ( ) ; fixio . fixprotocol . fields . UTCTimeOnlyField field = new fixio . fixprotocol . fields . UTCTimeOnlyField ( tag , bytes ) ; by... | org . junit . Assert . assertArrayEquals ( nanosBytes , field . getBytes ( ) ) |
testIntArrays ( ) { com . questdb . std . Rnd rnd = new com . questdb . std . Rnd ( ) ; com . questdb . store . UnstructuredFile hb = new com . questdb . store . UnstructuredFile ( temp . newFile ( ) , 16 , JournalMode . APPEND ) ; int [ ] vals = new int [ 100 ] ; long pos = hb . getPos ( ) ; for ( int i = 0 ; i < 1000... | org . junit . Assert . assertEquals ( rnd . nextInt ( ) , vals [ k ] ) |
testNullAdded ( ) { serviceFactoryMap . clear ( ) ; serviceLocator . factoryAdded ( null , java . util . Collections . emptyMap ( ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return getPropertyNames ( ) . size ( ) ; } | org . junit . Assert . assertEquals ( 0 , serviceFactoryMap . size ( ) ) |
fib7Test ( ) { final int actual = edu . rice . pcdp . future . FibFutureTest . kernel ( 7 ) ; final int expected = 13 ; "<AssertPlaceHolder>" ; } kernel ( int ) { final int [ ] result = new int [ 1 ] ; edu . rice . pcdp . PCDP . finish ( ( ) -> { try { result [ 0 ] = fib ( N ) ; } catch ( final ex ) { edu . rice . pcdp... | org . junit . Assert . assertEquals ( expected , actual ) |
Property ( ) { java . lang . String testENTITY = "testEntity" ; org . odata4j . edm . EdmEntityType . Builder entityType = EntityType ( testENTITY ) ; java . util . List < org . odata4j . edm . EdmComplexType . Builder > cpBuilderList = new java . util . ArrayList < org . odata4j . edm . EdmComplexType . Builder > ( ) ... | org . junit . Assert . assertEquals ( 0 , errors . size ( ) ) |
noFlow2 ( ) { java . lang . String mSig = ( "<" + ( soot . jimple . infoflow . test . methodSummary . junit . ApiTests . className ) ) + ":<sp>int<sp>noFlow2(int,int)>" ; java . util . Set < soot . jimple . infoflow . methodSummary . data . summary . MethodFlow > res = createSummaries ( mSig ) . getAllFlows ( ) ; "<Ass... | org . junit . Assert . assertTrue ( ( ( res == null ) || ( ( res . size ( ) ) == 0 ) ) ) |
testBasicProbabilities ( ) { org . evosuite . seeding . StaticConstantVariableProbabilityPool pool1 = new org . evosuite . seeding . StaticConstantVariableProbabilityPool ( ) ; org . evosuite . seeding . StaticConstantVariableProbabilityPool pool2 = new org . evosuite . seeding . StaticConstantVariableProbabilityPool (... | org . junit . Assert . assertTrue ( ( count1 < count2 ) ) |
testDubiousEquals ( ) { com . questdb . griffin . model . IntrinsicModel m = modelOf ( "sum(ts)<sp>=<sp>sum(ts)" ) ; "<AssertPlaceHolder>" ; } modelOf ( java . lang . CharSequence ) { return modelOf ( seq , null ) ; } | org . junit . Assert . assertNull ( m . filter ) |
createNpmAngularPortlet ( ) { wizardAction . openNewLiferayModuleWizard ( ) ; wizardAction . newModule . prepareGradle ( project . getName ( ) , com . liferay . ide . ui . portlet . tests . NPM_ANGULAR_PORTLET ) ; wizardAction . finish ( ) ; jobAction . waitForNoRunningJobs ( ) ; "<AssertPlaceHolder>" ; viewAction . pr... | org . junit . Assert . assertTrue ( viewAction . project . visibleFileTry ( project . getName ( ) ) ) |
testRemove ( ) { com . liferay . friendly . url . model . FriendlyURLEntryMapping newFriendlyURLEntryMapping = addFriendlyURLEntryMapping ( ) ; _persistence . remove ( newFriendlyURLEntryMapping ) ; com . liferay . friendly . url . model . FriendlyURLEntryMapping existingFriendlyURLEntryMapping = _persistence . fetchBy... | org . junit . Assert . assertNull ( existingFriendlyURLEntryMapping ) |
testImplicitCastInAccumulateFunction ( ) { java . lang . String str = ( ( ( ( ( "import<sp>" + ( org . drools . modelcompiler . AccumulateTest . ShortValue . class . getCanonicalName ( ) ) ) + ";" ) + "rule<sp>X<sp>when\n" ) + "<sp>$max<sp>:<sp>Double(doubleValue<sp>!=<sp>Double.MAX_VALUE)<sp>from<sp>accumulate<sp>(<sp... | org . junit . Assert . assertEquals ( 1 , ksession . fireAllRules ( ) ) |
testCompressAndDecompressBigPayload ( ) { byte [ ] input = new byte [ 1024 * 1024 ] ; new java . util . Random ( ) . nextBytes ( input ) ; int maxMessageSize = ( 1024 * 1024 ) + 8192 ; com . firefly . codec . websocket . model . extension . compress . DeflateFrameExtension clientExtension = new com . firefly . codec . ... | org . junit . Assert . assertArrayEquals ( input , result . toByteArray ( ) ) |
testGetVisibleGridWidgets ( ) { doReturn ( getGridWidgets ( ) ) . when ( defaultGridLayer ) . getGridWidgets ( ) ; final java . util . stream . Stream < org . uberfire . ext . wires . core . grids . client . widget . grid . GridWidget > gridWidgets = gridLienzoScrollBounds . getVisibleGridWidgets ( ) ; "<AssertPlaceHol... | org . junit . Assert . assertEquals ( 3 , gridWidgets . count ( ) ) |
testBasicData ( ) { com . github . jsonzou . jmockdata . BasicBean basicBean = com . github . jsonzou . jmockdata . JMockData . mock ( com . github . jsonzou . jmockdata . BasicBean . class ) ; "<AssertPlaceHolder>" ; try { com . github . jsonzou . jmockdata . JMockData . mock ( com . github . jsonzou . jmockdata . Err... | org . junit . Assert . assertNotNull ( basicBean ) |
testListByAuthUri ( ) { runTestAsSubject ( new org . apache . sentry . provider . db . service . thrift . TestOperation ( ) { @ org . apache . sentry . provider . db . service . thrift . Override public void runTestAsSubject ( ) throws org . apache . sentry . provider . db . service . thrift . Exception { java . lang .... | org . junit . Assert . assertEquals ( expectedResults , authPrivMap ) |
testWriteALotOfFiles ( ) { com . devexperts . qd . qtp . file . test . FileWriterParams . Default params = new com . devexperts . qd . qtp . file . test . FileWriterParams . Default ( ) ; params . setFormat ( FileFormat . TEXT ) ; params . setSplit ( com . devexperts . util . TimePeriod . valueOf ( "1s" ) ) ; fileWrite... | org . junit . Assert . assertEquals ( com . devexperts . qd . qtp . file . test . FileWriterTest . A_LOT_OF_FILES , getDataFiles ( ) . length ) |
debieraCrearTemporadaColportor ( ) { log . debug ( "temporada.id" 2 ) ; mx . edu . um . mateo . colportor . web . Organizacion organizacion = new mx . edu . um . mateo . colportor . web . Organizacion ( "observaciones" 9 , "observaciones" 4 , "observaciones" 4 ) ; currentSession ( ) . save ( organizacion ) ; mx . edu .... | org . junit . Assert . assertNotNull ( temporada ) |
testDrawBorderLineDashed2 ( ) { org . apache . fop . afp . BorderPaintingInfo paintInfo = new org . apache . fop . afp . BorderPaintingInfo ( 0 , 0 , 0 , 0 , false , org . apache . fop . fo . Constants . EN_DASHED , java . awt . Color . BLACK ) ; borderPainter . paint ( paintInfo ) ; ds . endDocument ( ) ; "<AssertPlac... | org . junit . Assert . assertNull ( line ) |
testRepositoryContainsStoredObject ( ) { com . github . resource4j . ResourceObject object = given ( com . github . resource4j . objects . ByteArrayResourceObjectBuilder . anObject ( ) ) ; objects . put ( object . name ( ) , withoutContext ( ) , object :: asStream ) ; "<AssertPlaceHolder>" ; } contains ( java . lang . ... | org . junit . Assert . assertTrue ( objects . contains ( object . name ( ) , withoutContext ( ) ) ) |
testAddDbNotExisting ( ) { System . out . println ( ( ( getTestTraceHead ( "[MySQLCache.addDb]" ) ) + "--------<sp>A<sp>database<sp>is<sp>added<sp>if<sp>not<sp>existing<sp>in<sp>the<sp>cache" ) ) ; com . telefonica . iot . cygnus . backends . mysql . MySQLCache cache = new com . telefonica . iot . cygnus . backends . m... | org . junit . Assert . assertTrue ( added ) |
setPercentType ( ) { org . eclipse . smarthome . core . library . items . NumberItem item = new org . eclipse . smarthome . core . library . items . NumberItem ( org . eclipse . smarthome . core . library . items . NumberItemTest . ITEM_NAME ) ; org . eclipse . smarthome . core . types . State percent = new org . eclip... | org . junit . Assert . assertEquals ( percent , item . getState ( ) ) |
test32 ( ) { byte [ ] packet = new byte [ ] { ( ( byte ) ( 255 ) ) , ( ( byte ) ( 255 ) ) } ; com . openddal . server . mysql . proto . Proto proto = new com . openddal . server . mysql . proto . Proto ( packet ) ; java . util . ArrayList < byte [ ] > payload = new java . util . ArrayList < byte [ ] > ( ) ; payload . a... | org . junit . Assert . assertArrayEquals ( packet , com . openddal . server . mysql . proto . Proto . arraylist_to_array ( payload ) ) |
reentrantLock ( ) { java . util . concurrent . locks . Lock lock = new java . util . concurrent . locks . ReentrantLock ( ) ; try ( alluxio . resource . LockResource r1 = new alluxio . resource . LockResource ( lock ) ) { try ( alluxio . resource . LockResource r2 = new alluxio . resource . LockResource ( lock ) ) { "<... | org . junit . Assert . assertTrue ( lock . tryLock ( ) ) |
testCannotExistTwoOrderElementsWithTheSameCode ( ) { final java . lang . String repeatedCode = "code1" ; org . libreplan . ws . common . api . OrderLineDTO orderLineDTO = createOrderLineDTO ( repeatedCode ) ; org . libreplan . ws . common . api . OrderDTO orderDTO = createOrderDTO ( repeatedCode ) ; orderDTO . children... | org . junit . Assert . assertTrue ( instanceConstraintViolationsList . toString ( ) , ( ( instanceConstraintViolationsList . size ( ) ) == 1 ) ) |
testGetOverlayReturningNull ( ) { final edu . illinois . library . cantaloupe . resource . RequestContext context = new edu . illinois . library . cantaloupe . resource . RequestContext ( ) ; edu . illinois . library . cantaloupe . script . DelegateProxyService service = edu . illinois . library . cantaloupe . script .... | org . junit . Assert . assertNull ( overlay ) |
testSetApplicationContext ( ) { org . quartz . impl . JobDetailImpl jobDetail = new org . quartz . impl . JobDetailImpl ( ) ; jobDetail . setJobClass ( com . thinkbiganalytics . scheduler . quartz . MockJob . class ) ; org . quartz . spi . TriggerFiredBundle bundle = new org . quartz . spi . TriggerFiredBundle ( jobDet... | org . junit . Assert . assertNotNull ( factory . createJobInstance ( bundle ) ) |
testGetHierarchyTypeByName ( ) { when ( hierarchyTypeService . getHierarchyTypeByName ( "Test" ) ) . thenReturn ( expectedHierarchyType ) ; org . egov . infra . admin . master . entity . HierarchyType hierarchyType = hierarchyTypeService . getHierarchyTypeByName ( "Test" ) ; "<AssertPlaceHolder>" ; } getName ( ) { retu... | org . junit . Assert . assertTrue ( hierarchyType . getName ( ) . equalsIgnoreCase ( expectedHierarchyType . getName ( ) ) ) |
testValidate ( ) { final ca . uhn . fhir . jaxrs . server . OperationOutcome oo = new ca . uhn . fhir . jaxrs . server . OperationOutcome ( ) ; final ca . uhn . fhir . jaxrs . server . Patient patient = new ca . uhn . fhir . jaxrs . server . Patient ( ) ; patient . addIdentifier ( new ca . uhn . fhir . jaxrs . server .... | org . junit . Assert . assertNotNull ( mO . getOperationOutcome ( ) ) |
testAnimalNegativeAge ( ) { org . eclipse . emf . ecore . EObject generic = testFactory . create ( animal ) ; generic . eSet ( age , ( - 50 ) ) ; "<AssertPlaceHolder>" ; } validateConstraints ( org . eclipse . emf . ecore . EObject ) { final org . eclipse . core . runtime . IStatus status = gov . nasa . ensemble . core... | org . junit . Assert . assertFalse ( validateConstraints ( generic ) ) |
testCallSoapClient_exception ( ) { com . google . api . ads . common . lib . client . RemoteCallReturn expectedRemoteCallReturn = new com . google . api . ads . common . lib . client . RemoteCallReturn . Builder ( ) . withException ( MockSoapClient . EXCEPTION ) . build ( ) ; com . google . api . ads . common . lib . s... | org . junit . Assert . assertSame ( MockSoapClient . EXCEPTION , testRemoteCallReturn . getException ( ) ) |
bytesNotEmittedToSinkWithoutFlush ( ) { okio . Buffer sink = new okio . Buffer ( ) ; okio . BufferedSink bufferedSink = new okio . RealBufferedSink ( sink ) ; bufferedSink . writeUtf8 ( "abc" ) ; "<AssertPlaceHolder>" ; } size ( ) { return pos ; } | org . junit . Assert . assertEquals ( 0 , sink . size ( ) ) |
testClearArgs ( ) { final org . apache . oozie . fluentjob . api . action . HiveActionBuilder builder = getBuilderInstance ( ) ; for ( final java . lang . String file : org . apache . oozie . fluentjob . api . action . TestHiveActionBuilder . ARGS ) { builder . withArg ( file ) ; } builder . clearArgs ( ) ; final org .... | org . junit . Assert . assertEquals ( 0 , argList . size ( ) ) |
testGetConfigSystemProperty ( ) { final java . lang . String propName = Config . HASH_ALGORITHM ; final java . lang . String originalValue = java . lang . System . getProperty ( propName ) ; try { final java . lang . String newVal = "XXX" ; java . lang . System . setProperty ( propName , newVal ) ; org . hyperledger . ... | org . junit . Assert . assertEquals ( config . getHashAlgorithm ( ) , newVal ) |
getAutomorphismGroup_StartingPartitionTest ( ) { org . openscience . cdk . group . Partition partition = org . openscience . cdk . group . Partition . fromString ( "0,1|2,3" ) ; java . lang . String acpString = "C0C1C2C3<sp>0:1(1),0:3(1),1:2(1),2:3(1)" ; org . openscience . cdk . interfaces . IAtomContainer ac = org . ... | org . junit . Assert . assertEquals ( 2 , autG . order ( ) ) |
testUpdateWithRelationship ( ) { org . apache . cayenne . access . IvConcrete parent1 = context . newObject ( org . apache . cayenne . access . IvConcrete . class ) ; parent1 . setName ( "Parent1" ) ; context . commitChanges ( ) ; org . apache . cayenne . access . IvConcrete parent2 = context . newObject ( org . apache... | org . junit . Assert . assertEquals ( parent2 , child . getParent ( ) ) |
isAdminProfile ( ) { com . navercorp . pinpoint . bootstrap . config . ProfilerConfig profilerConfig = new com . navercorp . pinpoint . bootstrap . config . DefaultProfilerConfig ( ) ; com . navercorp . pinpoint . plugin . hbase . HbasePluginConfig config = new com . navercorp . pinpoint . plugin . hbase . HbasePluginC... | org . junit . Assert . assertTrue ( config . isAdminProfile ( ) ) |
determineSchemaCanReadSchemaFromHDFS ( ) { java . lang . String schemaString = TestAvroObjectInspectorGenerator . RECORD_SCHEMA ; org . apache . hadoop . hdfs . MiniDFSCluster miniDfs = null ; try { miniDfs = new org . apache . hadoop . hdfs . MiniDFSCluster ( new org . apache . hadoop . conf . Configuration ( ) , 1 , ... | org . junit . Assert . assertEquals ( expectedSchema , schemaFromHDFS ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.