input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testReceiveImmediateWithZeroWindow3 ( ) { org . apache . activemq . artemis . core . server . ActiveMQServer server = createServer ( false , isNetty ( ) ) ; server . start ( ) ; locator . setConsumerWindowSize ( 0 ) ; org . apache . activemq . artemis . api . core . client . ClientSessionFactory sf = createSessionFacto... | org . junit . Assert . assertNotNull ( received ) |
testStringToJson ( ) { java . lang . String stringToConvert = "{\"ts\":1490196349868,\"metric.string\",\"1string.value\",\"metric.long\":9223372036854774999,\"metric.char\",\"1a\",\"metric.string.oneof\",\"1string.value.option.1\",\"metric.password\",\"1xea2sebrvKJQEW1YRDEEGg==\",\"metric.float\",\"2metric.integer.fixe... | org . junit . Assert . assertNotNull ( kuraPayload ) |
testGetNullCounters ( ) { org . apache . hadoop . mapred . JobStatus mockStatus = mock ( org . apache . hadoop . mapred . JobStatus . class ) ; org . apache . hadoop . mapred . JobProfile mockProf = mock ( org . apache . hadoop . mapred . JobProfile . class ) ; org . apache . hadoop . mapred . JobSubmissionProtocol moc... | org . junit . Assert . assertNull ( underTest . getCounters ( ) ) |
serverTimestamp ( ) { randomDoc . set ( com . google . cloud . firestore . LocalFirestoreHelper . map ( "time" , com . google . cloud . firestore . FieldValue . serverTimestamp ( ) ) ) . get ( ) ; com . google . cloud . firestore . DocumentSnapshot documentSnapshot = randomDoc . get ( ) . get ( ) ; "<AssertPlaceHolder>... | org . junit . Assert . assertTrue ( ( ( documentSnapshot . getDate ( "time" ) . getTime ( ) ) > 0 ) ) |
backupRestore ( ) { org . rocksdb . ColumnFamilyOptions cfOpts = new org . rocksdb . ColumnFamilyOptions ( ) . setMemTableConfig ( new org . rocksdb . HashLinkedListMemTableConfig ( ) ) . setCompressionType ( CompressionType . NO_COMPRESSION ) . useFixedLengthPrefixExtractor ( Longs . BYTES ) ; org . rocksdb . DBOption... | org . junit . Assert . assertArrayEquals ( "b" . getBytes ( ) , db . get ( testColumn . get ( ) , ( "a" + i ) . getBytes ( ) ) ) |
getMetricDefSpecificSvcAgainstDontCareNeg ( ) { org . ebayopensource . turmeric . runtime . common . monitoring . MetricsRegistry registry = org . ebayopensource . turmeric . runtime . common . monitoring . MetricsRegistry . getServerInstance ( ) ; try { registerTestMetricDefs ( ) ; org . ebayopensource . turmeric . ru... | org . junit . Assert . assertEquals ( null , def ) |
testAutoRemove ( ) { org . apache . commons . lang3 . tuple . Pair [ ] data = new org . apache . commons . lang3 . tuple . Pair [ ] { org . apache . commons . lang3 . tuple . Pair . of ( Boolean . TRUE , "{AutoRemove:<sp>true}" ) , org . apache . commons . lang3 . tuple . Pair . of ( Boolean . FALSE , "{AutoRemove:<sp>... | org . junit . Assert . assertEquals ( expected , result ) |
testGetWhileClear ( ) { final java . lang . Object key1 = getKey ( ) ; final java . lang . Object value1 = getValue ( ) ; int numTries = 10 ; final java . util . concurrent . atomic . AtomicBoolean monitorStateException = new java . util . concurrent . atomic . AtomicBoolean ( false ) ; final java . util . concurrent .... | org . junit . Assert . assertFalse ( monitorStateException . get ( ) ) |
testNotEndsWith ( ) { java . lang . String suffix = "foo" ; java . lang . String str = "blahtestchen" ; int result = org . evosuite . instrumentation . testability . StringHelper . StringEndsWith ( str , suffix ) ; "<AssertPlaceHolder>" ; } StringEndsWith ( java . lang . String , java . lang . String ) { int len = java... | org . junit . Assert . assertTrue ( ( result < 0 ) ) |
methodRuleIsIntroducedAndEvaluated ( ) { org . junit . rules . TestRuleTest . wasRun = false ; org . junit . runner . JUnitCore . runClasses ( org . junit . rules . TestRuleTest . MethodExampleTest . class ) ; "<AssertPlaceHolder>" ; } runClasses ( java . lang . Class [ ] ) { return org . junit . runner . JUnitCore . r... | org . junit . Assert . assertTrue ( org . junit . rules . TestRuleTest . wasRun ) |
case1 ( ) { org . openstack . atlas . usagerefactor . List < org . openstack . atlas . service . domain . usage . entities . LoadBalancerMergedHostUsage > mergedRecords = usagePollerHelper . processExistingEvents ( lbHostMap ) ; "<AssertPlaceHolder>" ; org . openstack . atlas . usagerefactor . junit . AssertLoadBalance... | org . junit . Assert . assertEquals ( 1 , mergedRecords . size ( ) ) |
testGetParentLogger ( ) { io . sniffy . Driver driver = io . sniffy . DriverManager . getDriver ( "sniffer:jdbc:h2:mem:" ) ; try { driver . getParentLogger ( ) ; org . junit . Assert . fail ( ) ; } catch ( io . sniffy . SQLFeatureNotSupportedException e ) { "<AssertPlaceHolder>" ; } } getParentLogger ( ) { return dataS... | org . junit . Assert . assertNotNull ( e ) |
remoteProcessGroupStatusStats ( ) { populateRemoteProcessGroup ( false , false ) ; java . lang . String statusRequest = "remoteProcessGroup:all:stats" ; org . apache . nifi . minifi . commons . status . FlowStatusReport actual = org . apache . nifi . minifi . status . StatusConfigReporter . getStatus ( mockFlowControll... | org . junit . Assert . assertEquals ( expected , actual ) |
onGivenRequestCollectionGetShouldHandleIt ( ) { io . katharsis . core . internal . dispatcher . path . JsonPath jsonPath = pathBuilder . build ( "/tasks/" ) ; io . katharsis . core . internal . dispatcher . controller . CollectionGet sut = new io . katharsis . core . internal . dispatcher . controller . CollectionGet (... | org . junit . Assert . assertNotNull ( response ) |
shouldFailWebSocketConnectionWhenServerSendPongFrameWithPayloadTooLong ( ) { final org . apache . mina . core . service . IoHandler handler = context . mock ( org . apache . mina . core . service . IoHandler . class ) ; context . checking ( new org . kaazing . gateway . transport . test . Expectations ( ) { { oneOf ( h... | org . junit . Assert . assertTrue ( connectFuture . isConnected ( ) ) |
testStringDefault ( ) { com . j256 . ormlite . dao . Dao < com . j256 . ormlite . dao . JdbcBaseDaoImplTest . StringDefalt , java . lang . Object > dao = createDao ( com . j256 . ormlite . dao . JdbcBaseDaoImplTest . StringDefalt . class , true ) ; com . j256 . ormlite . dao . JdbcBaseDaoImplTest . StringDefalt foo = n... | org . junit . Assert . assertEquals ( 1 , dao . create ( foo ) ) |
offsetTime ( ) { java . time . OffsetTime offsetTime = java . time . OffsetTime . of ( 10 , 33 , 24 , 5 , java . time . ZoneOffset . ofHours ( 2 ) ) ; javax . ws . rs . ext . ParamConverter < java . time . OffsetTime > converter = ( ( javax . ws . rs . ext . ParamConverter < java . time . OffsetTime > ) ( provider . ge... | org . junit . Assert . assertEquals ( offsetTime , converter . fromString ( converter . toString ( offsetTime ) ) ) |
givenParams_whenJavaStream_thenReturnVavrListUsingOfAll ( ) { java . util . stream . Stream < java . lang . String > javaStream = java . util . Arrays . asList ( "Java" , "Haskell" , "Scala" ) . stream ( ) ; io . vavr . collection . Stream < java . lang . String > vavrStream = io . vavr . collection . Stream . ofAll ( ... | org . junit . Assert . assertTrue ( ( vavrStream instanceof io . vavr . collection . Stream ) ) |
objectsWithHangingIndent2 ( ) { buf . appendHangingIndent ( "\n" ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( "JspEngine[" + ( path ) ) + "]" ; } | org . junit . Assert . assertEquals ( "\n" , buf . toString ( ) ) |
withTwoNodes ( ) { treegraph . BinaryTreeNode root = new treegraph . BinaryTreeNode ( 1 ) ; root . right = new treegraph . BinaryTreeNode ( 2 ) ; "<AssertPlaceHolder>" ; } sequences ( treegraph . BinaryTreeNode ) { java . util . List < java . util . LinkedList < java . lang . Integer > > result = new java . util . Arra... | org . junit . Assert . assertEquals ( java . util . Collections . singletonList ( java . util . Arrays . asList ( 1 , 2 ) ) , s . sequences ( root ) ) |
testSocketFactoryException ( ) { javax . net . SocketFactory mockFactory = mock ( javax . net . SocketFactory . class ) ; doThrow ( new java . io . IOException ( "Injected<sp>fault" ) ) . when ( mockFactory ) . createSocket ( ) ; org . apache . hadoop . ipc . Client client = new org . apache . hadoop . ipc . Client ( o... | org . junit . Assert . assertTrue ( e . getMessage ( ) . contains ( "Injected<sp>fault" ) ) |
shouldAllowToDeleteUserIfCurrentUserIdIsNull ( ) { stubCurrentUserId ( null ) ; stubUserEntityId ( 9999L ) ; boolean canDelete = userModelHooks . preventSelfDeletion ( userDD , user ) ; "<AssertPlaceHolder>" ; } preventSelfDeletion ( com . qcadoo . model . api . DataDefinition , com . qcadoo . model . api . Entity ) { ... | org . junit . Assert . assertTrue ( canDelete ) |
testWALCoprocessorLoaded ( ) { org . apache . hadoop . hbase . regionserver . wal . WALCoprocessorHost host = wals . getWAL ( null ) . getCoprocessorHost ( ) ; org . apache . hadoop . hbase . Coprocessor c = host . findCoprocessor ( org . apache . hadoop . hbase . coprocessor . SampleRegionWALCoprocessor . class ) ; "<... | org . junit . Assert . assertNotNull ( c ) |
testOptional4 ( ) { java . lang . String grammar = "grammar<sp>T;\n" + ( ( ( ( ( "options<sp>{output=AST;}\n" + "tokens<sp>{BLOCK;}\n" ) + "a<sp>:<sp>x+=ID<sp>(y=b)?<sp>-><sp>($x<sp>$y)?;\n" ) + "TParser" 2 ) + "ID<sp>:<sp>\'a\'..\'z\'+<sp>;\n" ) + "WS<sp>:<sp>(\'<sp>\'|\'\\n\')<sp>{$channel=HIDDEN;}<sp>;\n" ) ; java .... | org . junit . Assert . assertEquals ( "TParser" 0 , found ) |
testPasswordKeyUsesRandomSalts ( ) { final char [ ] password = "foo" . toCharArray ( ) ; org . cryptonode . jncryptor . PasswordKey key1 = new org . cryptonode . jncryptor . AES256JNCryptor ( ) . getPasswordKey ( password ) ; org . cryptonode . jncryptor . PasswordKey key2 = new org . cryptonode . jncryptor . AES256JNC... | org . junit . Assert . assertFalse ( java . util . Arrays . equals ( key1 . getSalt ( ) , key2 . getSalt ( ) ) ) |
testCallOptionalExistingMethod ( ) { org . pm4j . core . pm . impl . pathresolver . Pojo p = org . pm4j . core . pm . impl . pathresolver . Pojo . make ( "head" ) ; org . pm4j . common . expr . Expression expr = org . pm4j . core . pm . impl . expr . PathExpressionChain . parse ( "(x)nonExistingMethod().name" ) ; "<Ass... | org . junit . Assert . assertNull ( expr . getValue ( p ) ) |
testSerializeDataSchema ( ) { final byte ID = 9 ; final long UUID = 1234567891011L ; final short CODE = 1 ; com . nhnent . haste . protocol . Protocol protocol = com . nhnent . haste . protocol . protocols . BinaryProtocol . instance ; com . nhnent . haste . protocol . messages . BinaryProtocolTest . CustomDataSchema d... | org . junit . Assert . assertArrayEquals ( expected . array ( ) , bytes ) |
testIsMatchTypeNull ( ) { org . sagebionetworks . repo . model . table . ColumnModel model = EntityField . name . getColumnModel ( ) ; model . setColumnType ( null ) ; "<AssertPlaceHolder>" ; } isMatch ( org . sagebionetworks . repo . model . table . ColumnModel ) { org . sagebionetworks . repo . model . table . Column... | org . junit . Assert . assertFalse ( EntityField . name . isMatch ( model ) ) |
testStartValue ( ) { final org . kie . workbench . common . dmn . api . editors . types . RangeValue range = new org . kie . workbench . common . dmn . api . editors . types . RangeValue ( ) ; final java . lang . String expected = "something" ; range . setStartValue ( "something" ) ; "<AssertPlaceHolder>" ; } getStartV... | org . junit . Assert . assertEquals ( expected , range . getStartValue ( ) ) |
testCloseSessionDuringFTGS ( ) { java . lang . String tempDir = com . indeed . util . io . Files . getTempDirectory ( "asdf" , "" ) ; try { org . apache . lucene . index . IndexWriter w = new org . apache . lucene . index . IndexWriter ( tempDir , new org . apache . lucene . analysis . WhitespaceAnalyzer ( ) , true , I... | org . junit . Assert . assertTrue ( closed . get ( ) ) |
signatureTest2 ( ) { java . lang . String methodName = "sourceTest" ; java . lang . String returnType = "void" ; java . lang . String className = "com.example.androidtest.Sources" ; java . util . List < java . lang . String > methodParameters = new java . util . ArrayList < java . lang . String > ( ) ; methodParameters... | org . junit . Assert . assertEquals ( am1 , am2 ) |
customIndirectBaseClass ( ) { setupSingleDestScript ( ) ; java . lang . Object runtime = jiffle . getRuntimeInstance ( it . geosolutions . jaiext . jiffle . MockIndirectBaseClass . class ) ; "<AssertPlaceHolder>" ; } getRuntimeInstance ( it . geosolutions . jaiext . jiffle . Jiffle$RuntimeModel ) { return createRuntime... | org . junit . Assert . assertTrue ( ( runtime instanceof it . geosolutions . jaiext . jiffle . MockIndirectBaseClass ) ) |
shouldMergeAccumuloJsonModulesAndDeduplicate ( ) { final uk . gov . gchq . gaffer . accumulostore . AccumuloProperties props = new uk . gov . gchq . gaffer . accumulostore . AccumuloProperties ( ) ; props . setJsonSerialiserModules ( ( ( ( uk . gov . gchq . gaffer . accumulostore . AccumuloPropertiesTest . TestCustomJs... | org . junit . Assert . assertEquals ( ( ( ( uk . gov . gchq . gaffer . sketches . serialisation . json . SketchesJsonModules . class . getName ( ) ) + "," ) + ( uk . gov . gchq . gaffer . accumulostore . AccumuloPropertiesTest . TestCustomJsonModules1 . class . getName ( ) ) ) , modules ) |
testAdvancedOptionsVisibleWithNonNativeAuthentication ( ) { hudson . plugins . active_directory . ActiveDirectoryDomain activeDirectoryDomain = new hudson . plugins . active_directory . ActiveDirectoryDomain ( hudson . plugins . active_directory . docker . TheFlintstonesTest . AD_DOMAIN , null , null , hudson . plugins... | org . junit . Assert . assertTrue ( ( domElement != null ) ) |
testGetById_Null_Test ( ) { com . onboard . service . collaboration . impl . test . Mockito . reset ( mockBugMapper ) ; when ( mockBugMapper . selectByPrimaryKey ( ModuleHelper . id ) ) . thenReturn ( null ) ; com . onboard . domain . model . Bug bug = testedBugServiceImpl . getById ( ModuleHelper . id ) ; verify ( moc... | org . junit . Assert . assertNull ( bug ) |
iterateImageSumStream3 ( ) { final org . eclipse . january . dataset . ILazyDataset lz = org . eclipse . january . dataset . Random . lazyRand ( 64 , 64 , 100 , 100 ) ; java . util . List < java . lang . Number > maxes = org . eclipse . dawnsci . analysis . dataset . SliceStreamSupport . sliceStream ( lz , 0 , 2 ) . ma... | org . junit . Assert . assertEquals ( ( 64 * 100 ) , maxes . size ( ) ) |
testGetAllBusinessObjectDataByBusinessObjectDefinition ( ) { org . finra . herd . model . api . xml . BusinessObjectDefinitionKey businessObjectDefinitionKey = new org . finra . herd . model . api . xml . BusinessObjectDefinitionKey ( BDEF_NAMESPACE , BDEF_NAME ) ; org . finra . herd . model . api . xml . BusinessObjec... | org . junit . Assert . assertEquals ( businessObjectDataKeys , result ) |
shouldSerializeAProxyForABeanWithoutDefaultConstructorAndUnloadedProperties ( ) { org . apache . ibatis . executor . loader . SerializableProxyTest . AuthorWithoutDefaultConstructor author = new org . apache . ibatis . executor . loader . SerializableProxyTest . AuthorWithoutDefaultConstructor ( 999 , "someone" , "!@#@... | org . junit . Assert . assertEquals ( author , proxy2 ) |
getAdellijkeTitelPredikaatOkTest ( ) { final java . lang . String code = "JH" ; final java . lang . String expectedLabel = "Jonkheer<sp>/<sp>Jonkvrouw" ; final java . lang . String expected = ( ( code + "<sp>(" ) + expectedLabel ) + ")" ; final java . lang . String resultNat = lo3StamtabelService . getAdellijkeTitelPre... | org . junit . Assert . assertEquals ( expected , resultNat ) |
testSimple ( ) { try { this . kevs . executeFromStream ( getClass ( ) . getResourceAsStream ( "/kevs/add/simple.kevs" ) , this . model ) ; org . kevoree . ContainerNode node = this . model . findNodesByID ( "node" ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; org . junit ... | org . junit . Assert . assertNotNull ( node ) |
callActive3 ( ) { int count = com . acme . multinode . grid . Utils . incrementCache ( cache ) ; System . out . println ( ( "Cache<sp>incremented,<sp>current<sp>count:<sp>" + count ) ) ; "<AssertPlaceHolder>" ; } incrementCache ( org . infinispan . Cache ) { java . lang . String key = "counter" ; java . lang . Integer ... | org . junit . Assert . assertEquals ( 3 , count ) |
existingDocumentFromUITemplateProviderSpecifiedNonTerminalOverridenFromUIToTerminal ( ) { org . xwiki . model . reference . DocumentReference documentReference = new org . xwiki . model . reference . DocumentReference ( "tocreate" 2 , java . util . Arrays . asList ( "tocreate" 0 ) , "WebHome" ) ; com . xpn . xwiki . do... | org . junit . Assert . assertNull ( result ) |
testIsRevealedWhenOnTopRightEdge ( ) { org . eclipse . swt . graphics . Point origin = new org . eclipse . swt . graphics . Point ( 0 , 0 ) ; org . eclipse . swt . graphics . Rectangle clientArea = createRectangle ( 0 , 0 , 100 , 100 ) ; org . eclipse . swt . graphics . Rectangle controlBounds = createRectangle ( 90 , ... | org . junit . Assert . assertTrue ( isRevealed ) |
testNewSessionConstruction ( ) { org . finra . jtaf . ewd . ExtWebDriver ewd = org . finra . jtaf . ewd . session . SessionManager . getInstance ( ) . setSessionFactory ( new org . finra . jtaf . ewd . session . SessionManagerTests . TestFactory ( ) ) . getNewSession ( ) ; "<AssertPlaceHolder>" ; } getNewSession ( ) { ... | org . junit . Assert . assertNotNull ( ewd ) |
isNotWatching ( ) { group = new org . bitcoinj . wallet . KeyChainGroup ( org . bitcoinj . wallet . KeyChainGroupTest . PARAMS ) ; final org . bitcoinj . wallet . ECKey key = org . bitcoinj . wallet . ECKey . fromPrivate ( BigInteger . TEN ) ; group . importKeys ( key ) ; "<AssertPlaceHolder>" ; } isWatching ( ) { keyC... | org . junit . Assert . assertFalse ( group . isWatching ( ) ) |
getExtendedTypesTest ( ) { java . util . List < gov . nysenate . sage . model . district . DistrictType . DistrictType > extendedTypes = gov . nysenate . sage . model . district . DistrictType . DistrictType . getExtendedTypes ( ) ; java . util . List < gov . nysenate . sage . model . district . DistrictType . District... | org . junit . Assert . assertEquals ( new java . util . HashSet ( expectedTypes ) , new java . util . HashSet ( extendedTypes ) ) |
testFormatSequence ( ) { com . sun . mail . util . logging . CompactFormatter cf = new com . sun . mail . util . logging . CompactFormatter ( "%9$d" ) ; java . util . logging . LogRecord record = new java . util . logging . LogRecord ( java . util . logging . Level . SEVERE , "" ) ; java . lang . String output = cf . f... | org . junit . Assert . assertEquals ( expect , output ) |
testSendProcessedMessageAppearsInS3 ( ) { net . sf . json . JSONObject imgPayload = com . streamreduce . test . service . TestUtils . createValidSampleIMGPayload ( ) ; com . streamreduce . core . model . Connection testIMGConnection = com . streamreduce . test . service . TestUtils . createIMGConnectionWithSpecificOutb... | org . junit . Assert . assertEquals ( expectedJSONFromOriginalSobaMessage , actualJSONPayloadFromS3 ) |
testJSON ( ) { temp . ReadContext context = new temp . TestJSONIssue . FakeContext ( ) ; temp . ByteArrayOutputStream os = new temp . ByteArrayOutputStream ( ) ; temp . Writer writer = com . epimorphics . util . StreamUtils . asUTF8 ( os ) ; temp . Encoder . getForOneResult ( context ) . encodeRecursive ( model , items... | org . junit . Assert . assertNotNull ( content ) |
testMultiplierBuilder ( ) { final int repeat = 7 ; final int msgs = 10 ; java . lang . String cfg = ( "{<sp>mult(" + repeat ) + ")<sp>=><sp>counter(\"count\")<sp>}" ; com . cloudera . flume . core . EventSink s = com . cloudera . flume . conf . FlumeBuilder . buildSink ( new com . cloudera . flume . conf . ReportTestin... | org . junit . Assert . assertEquals ( ( msgs * repeat ) , cnt . getCount ( ) ) |
testVerifyWithoutSignaturesIsBogus ( ) { org . jitsi . dnssec . validator . DnsSecVerifier verifier = new org . jitsi . dnssec . validator . DnsSecVerifier ( ) ; org . xbill . DNS . ARecord record = new org . xbill . DNS . ARecord ( org . xbill . DNS . Name . root , org . xbill . DNS . DClass . IN , 120 , localhost ) ;... | org . junit . Assert . assertEquals ( SecurityStatus . BOGUS , result ) |
isProtectedMethodAndTestingRequired_A$MethodMeta$TestingTarget ( ) { org . junithelper . core . meta . MethodMeta methodMeta = new org . junithelper . core . meta . MethodMeta ( ) ; methodMeta . accessModifier = org . junithelper . core . meta . AccessModifier . Protected ; org . junithelper . core . config . TestingTa... | org . junit . Assert . assertThat ( actual , is ( equalTo ( expected ) ) ) |
testPromoteBigDecimalAndDoubleResultsInBigDecimalType ( ) { "<AssertPlaceHolder>" ; } promote ( com . redhat . lightblue . metadata . Type , com . redhat . lightblue . metadata . Type ) { if ( ( ( operand1 instanceof com . redhat . lightblue . metadata . types . BigIntegerType ) && ( operand2 instanceof com . redhat . ... | org . junit . Assert . assertEquals ( BigDecimalType . TYPE , com . redhat . lightblue . metadata . types . Arith . promote ( BigDecimalType . TYPE , DoubleType . TYPE ) ) |
testSerialization ( ) { org . jfree . chart . labels . StandardXYToolTipGenerator g1 = new org . jfree . chart . labels . StandardXYToolTipGenerator ( ) ; org . jfree . chart . labels . StandardXYToolTipGenerator g2 = ( ( org . jfree . chart . labels . StandardXYToolTipGenerator ) ( org . jfree . chart . TestUtilities ... | org . junit . Assert . assertEquals ( g1 , g2 ) |
test ( ) { com . li3huo . sdk . tools . PropertiesTest . logger . debug ( ( "name<sp>=<sp>" + ( com . li3huo . sdk . tools . PropertiesTest . games . getProperty ( "500006.name" ) ) ) ) ; com . li3huo . sdk . tools . PropertiesTest . logger . debug ( ( "debug<sp>=<sp>" + ( com . li3huo . sdk . tools . PropertiesTest . ... | org . junit . Assert . assertEquals ( "" , com . li3huo . sdk . tools . PropertiesTest . games . getProperty ( "500006.name" ) ) |
testGetAll ( ) { org . redisson . api . RMapRx < java . lang . Integer , java . lang . Integer > map = redisson . getMap ( "getAll" ) ; sync ( map . put ( 1 , 100 ) ) ; sync ( map . put ( 2 , 200 ) ) ; sync ( map . put ( 3 , 300 ) ) ; sync ( map . put ( 4 , 400 ) ) ; java . util . Map < java . lang . Integer , java . l... | org . junit . Assert . assertEquals ( expectedMap , filtered ) |
testReadShort ( ) { java . nio . ByteBuffer byteBuffer = java . nio . ByteBuffer . allocate ( ( ( com . liferay . petra . io . DeserializerTest . _COUNT ) * 2 ) ) ; byteBuffer . order ( ByteOrder . BIG_ENDIAN ) ; java . nio . ShortBuffer shortBuffer = byteBuffer . asShortBuffer ( ) ; short [ ] shorts = new short [ com ... | org . junit . Assert . assertEquals ( shorts [ i ] , deserializer . readShort ( ) ) |
testStringHashSet ( ) { java . util . Set < java . lang . String > mySet = new java . util . HashSet ( java . util . Arrays . asList ( "A" , "B" , "C" ) ) ; java . util . Set < java . lang . String > targetSet = new ro . pippo . core . ParameterValue ( "C" , "B" , "A" ) . toSet ( java . lang . String . class ) ; "<Asse... | org . junit . Assert . assertEquals ( mySet , targetSet ) |
testResolveEmptyIObject ( ) { info . smart_tools . smartactors . iobject . ifield_name . IFieldName fieldName = info . smart_tools . smartactors . ioc . ioc . IOC . resolve ( info . smart_tools . smartactors . ioc . named_keys_storage . Keys . getOrAdd ( "info.smart_tools.smartactors.iobject.ifield_name.IFieldName" ) ,... | org . junit . Assert . assertNull ( object . getValue ( fieldName ) ) |
givenProcessDistributorWhenRegisterWorkerThenAlreadyExists ( ) { final java . lang . String familyId = "DefaultWorker1" ; final java . lang . String workerId = "NewWorkerId" + ( fr . gouv . vitam . common . guid . GUIDFactory . newGUID ( ) . getId ( ) ) ; workerManager . registerWorker ( familyId , workerId , fr . gouv... | org . junit . Assert . assertTrue ( ( ( workerManager . findWorkerBy ( familyId ) ) != null ) ) |
render ( ) { java . util . Set < java . lang . String > results = createLinkedHashSet ( ) ; for ( int i = 0 ; i < 10 ; i ++ ) { results . add ( getRandomResult ( broker . render ( ) , "http://taobao.com/hello?r=" ) ) ; } "<AssertPlaceHolder>" ; } size ( ) { return propertyEditorRegistrars . size ( ) ; } | org . junit . Assert . assertEquals ( 10 , results . size ( ) ) |
getGroupOfFile_shouldReturnNull ( ) { writeToCache ( "/file.txt" ) ; commitToMaster ( ) ; initGitFileSystem ( ) ; java . nio . file . attribute . PosixFileAttributes attributes = readPosixAttributes ( "/file.txt" ) ; "<AssertPlaceHolder>" ; } group ( ) { return group ; } | org . junit . Assert . assertNull ( attributes . group ( ) ) |
getCountOfPatients_shouldCountZeroPatientsWhenQueryIsNull_SignatureNo2 ( ) { long patientCount = dao . getCountOfPatients ( null ) ; "<AssertPlaceHolder>" ; } getCountOfPatients ( java . lang . String ) { return getCountOfPatients ( query , false ) ; } | org . junit . Assert . assertEquals ( 0 , patientCount ) |
rpcReturnsResultWhenResponseHasCome ( ) { int rpcTimeout = 1000 ; com . rabbitmq . client . impl . AMQConnection connection = mock ( com . rabbitmq . client . impl . AMQConnection . class ) ; when ( connection . getChannelRpcTimeout ( ) ) . thenReturn ( rpcTimeout ) ; when ( connection . getTrafficListener ( ) ) . then... | org . junit . Assert . assertThat ( rpcResponse . getMethod ( ) , is ( response ) ) |
shouldSelectAListOfTexts ( ) { java . util . List < com . redhat . darcy . ui . api . elements . Text > shouldFind = java . util . Arrays . asList ( mock ( com . redhat . darcy . ui . api . elements . Text . class ) ) ; when ( selection . elementsOfType ( com . redhat . darcy . ui . api . elements . Text . class , com ... | org . junit . Assert . assertSame ( shouldFind , selection . texts ( com . redhat . darcy . ui . By . id ( "test" ) ) ) |
testAddingItemsInstantiatesList ( ) { builder . apples ( "red" , "green" ) ; final io . norberg . automatter . NullableListFieldBuilderTest . NullableLists lists = builder . build ( ) ; "<AssertPlaceHolder>" ; } build ( ) { return new foo . GenericJUTOptionalFieldsBuilder . Value < T > ( foo , bar ) ; } | org . junit . Assert . assertThat ( lists . apples ( ) , is ( asList ( "red" , "green" ) ) ) |
testHashcodeAfterReencodingWithInvalidUuid ( ) { datawave . edge . util . EdgeValue originalEdgeValue = createEdgeValueWithUuid ( "1234" ) ; datawave . edge . util . EdgeValue decodedEdgeValue = datawave . edge . util . EdgeValue . decode ( createEdgeValueWithUuid ( "1234" ) . encode ( ) ) ; "<AssertPlaceHolder>" ; } h... | org . junit . Assert . assertEquals ( ( ( originalEdgeValue + "\n" ) + decodedEdgeValue ) , originalEdgeValue . hashCode ( ) , decodedEdgeValue . hashCode ( ) ) |
clearEditingContextChangesAfterTestExecution ( ) { com . wounit . rules . AbstractEditingContextRule editingContext = initEditingContext ( com . wounit . rules . AbstractEditingContextTest . TEST_MODEL_NAME ) ; editingContext . before ( ) ; com . wounit . model . FooEntity foo = com . wounit . model . FooEntity . creat... | org . junit . Assert . assertThat ( result . isEmpty ( ) , org . hamcrest . CoreMatchers . is ( true ) ) |
givenMoneyInstancesWithSameAmountAndCurrency_whenEquals_thenReturnsTrue ( ) { com . baeldung . equalshashcode . Money income = new com . baeldung . equalshashcode . Money ( 55 , "USD" ) ; com . baeldung . equalshashcode . Money expenses = new com . baeldung . equalshashcode . Money ( 55 , "USD" ) ; "<AssertPlaceHolder>... | org . junit . Assert . assertTrue ( income . equals ( expenses ) ) |
nextByteWithIdenticalMinAndMax ( ) { "<AssertPlaceHolder>" ; } nextByte ( byte , byte ) { return ( ( byte ) ( nextLong ( min , max ) ) ) ; } | org . junit . Assert . assertEquals ( ( ( byte ) ( - 2 ) ) , source . nextByte ( ( ( byte ) ( - 2 ) ) , ( ( byte ) ( - 2 ) ) ) ) |
testGetStartSequenceNumber ( ) { org . openscience . cdk . interfaces . IPDBStructure structure = org . openscience . cdk . interfaces . AbstractPDBStructureTest . getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IPDBStructure . class ) ; "<AssertPlaceHolder>" ; } getStartSequenceNumber ( ) { retur... | org . junit . Assert . assertNull ( structure . getStartSequenceNumber ( ) ) |
testClassInitializationFailure ( ) { java . lang . Throwable throwable = new java . lang . Throwable ( ) ; com . liferay . portal . test . aspects . ReflectionUtilAdvice . setDeclaredMethodThrowable ( throwable ) ; try { java . lang . Class . forName ( com . liferay . portal . configuration . metatype . bnd . util . Co... | org . junit . Assert . assertSame ( throwable , eiie . getCause ( ) ) |
loginPasses ( ) { java . util . Map < java . lang . String , java . lang . Object > sharedState = createSharedState ( ) ; com . ibm . ws . security . authentication . jaas . modules . CertificateLoginModule module = createInitializedModule ( new javax . security . auth . Subject ( ) , sharedState ) ; "<AssertPlaceHolde... | org . junit . Assert . assertTrue ( module . login ( ) ) |
sort_string_array_in_java ( ) { java . lang . String [ ] wiStateParks = new java . lang . String [ ] { "Mill<sp>Bluff<sp>State<sp>Park" , "Amnicon<sp>Falls<sp>State<sp>Park" , "Wyalusing<sp>State<sp>Park" , "Big<sp>Foot<sp>Beach<sp>State<sp>Park" , "Willow<sp>River<sp>State<sp>Park" , "Roche-A-Cri<sp>State<sp>Park" } ;... | org . junit . Assert . assertArrayEquals ( new java . lang . String [ ] { "Amnicon<sp>Falls<sp>State<sp>Park" , "Big<sp>Foot<sp>Beach<sp>State<sp>Park" , "Mill<sp>Bluff<sp>State<sp>Park" , "Roche-A-Cri<sp>State<sp>Park" , "Willow<sp>River<sp>State<sp>Park" , "Wyalusing<sp>State<sp>Park" } , wiStateParks ) |
testVerifyPolicy2 ( ) { com . liferay . portal . security . membershippolicy . UserGroupMembershipPolicyFactoryImplTest . _atomicState . reset ( ) ; com . liferay . portal . kernel . security . membershippolicy . UserGroupMembershipPolicyUtil . verifyPolicy ( null ) ; "<AssertPlaceHolder>" ; } isSet ( ) { if ( Boolean ... | org . junit . Assert . assertTrue ( com . liferay . portal . security . membershippolicy . UserGroupMembershipPolicyFactoryImplTest . _atomicState . isSet ( ) ) |
testLookaheadEmptyIterator ( ) { try ( java . io . FileInputStream is = new java . io . FileInputStream ( "resources/document/notEmpty/notEmpty-template.docx" ) ; org . apache . poi . openxml4j . opc . OPCPackage oPackage = org . apache . poi . openxml4j . opc . OPCPackage . open ( is ) ; org . apache . poi . xwpf . us... | org . junit . Assert . assertNull ( iterator . lookAhead ( 1 ) ) |
testCloseSubscriber ( ) { transport . dispatcher = mockDispatcher ; transport . unsubscribe ( ) ; "<AssertPlaceHolder>" ; transport . unsubscribe ( ) ; } isSubscribed ( ) { return ( ( session ) != null ) && ( ( consumer ) != null ) ; } | org . junit . Assert . assertFalse ( transport . isSubscribed ( ) ) |
testAllocateMemory10 ( ) { int offset = 32 ; int size = 0 ; program . allocateMemory ( offset , size ) ; "<AssertPlaceHolder>" ; } getMemSize ( ) { return ( memory ) != null ? memory . limit ( ) : 0 ; } | org . junit . Assert . assertEquals ( 0 , program . getMemSize ( ) ) |
validate_shouldPassValidationIfAllRequiredFieldsHaveProperValues ( ) { org . openmrs . LocationAttributeType type = new org . openmrs . LocationAttributeType ( ) ; type . setName ( "name" ) ; type . setDatatypeClassname ( "org.openmrs.customdatatype.datatype.FreeTextDatatype" ) ; org . springframework . validation . Er... | org . junit . Assert . assertFalse ( errors . hasErrors ( ) ) |
testIsCyclicSingletonGraph ( ) { java . util . List < java . util . List < java . lang . Integer > > adjacencyList = new java . util . ArrayList ( ) ; adjacencyList . add ( new java . util . LinkedList ( ) ) ; com . olacabs . fabric . manager . utils . graph . DirectedGraph graph = new com . olacabs . fabric . manager ... | org . junit . Assert . assertFalse ( graph . hasCycle ( ) ) |
testVirtUses1IfNoVcpu ( ) { consumer . getEntitlements ( ) . clear ( ) ; consumer . setFact ( org . candlepin . policy . js . quantity . QuantityRulesTest . IS_VIRT , "true" ) ; consumer . setFact ( org . candlepin . policy . js . quantity . QuantityRulesTest . SOCKET_FACT , "4" ) ; consumer . setFact ( org . candlepin... | org . junit . Assert . assertEquals ( new java . lang . Long ( 1 ) , suggested . getSuggested ( ) ) |
test_subusers_post ( ) { com . sendgrid . SendGrid sg = new com . sendgrid . SendGrid ( "SENDGRID_API_KEY" , true ) ; sg . setHost ( "localhost:4010" ) ; sg . addRequestHeader ( "X-Mock" , "200" ) ; com . sendgrid . Request request = new com . sendgrid . Request ( ) ; request . setMethod ( Method . POST ) ; request . s... | org . junit . Assert . assertEquals ( 200 , response . getStatusCode ( ) ) |
testFindOnlyWildcardFingerPrintMatch ( ) { org . robovm . compiler . target . ios . ProvisioningProfile p1 = createProfile ( "DF6YH89WE3" 3 , "App<sp>1" , "DF6YH89WE3" , "DF6YH89WE3.*" , false , null , "DF6YH89WE3" 1 ) ; org . robovm . compiler . target . ios . ProvisioningProfile p2 = createProfile ( "Profile<sp>2" , ... | org . junit . Assert . assertSame ( p1 , result ) |
addToIndex ( ) { final int rows = subject . addToIndex ( null , null , null , ( ( java . lang . String ) ( null ) ) ) ; "<AssertPlaceHolder>" ; } addToIndex ( org . springframework . jdbc . core . JdbcTemplate , net . ripe . db . whois . common . dao . RpslObjectInfo , net . ripe . db . whois . common . rpsl . RpslObje... | org . junit . Assert . assertThat ( rows , org . hamcrest . Matchers . is ( 1 ) ) |
testCheckForAuthenticatedAdminWithConfiguredAdminUsers ( ) { configuration . setAdminUsers ( com . google . common . collect . ImmutableSet . of ( "slarti" ) ) ; sonia . scm . user . User slarti = sonia . scm . user . UserTestData . createSlarti ( ) ; slarti . setAdmin ( false ) ; java . util . Set < java . lang . Stri... | org . junit . Assert . assertTrue ( slarti . isAdmin ( ) ) |
test_DoublesPair_of_DoublesPair ( ) { org . testng . eclipse . convert . DoublesPair base = org . testng . eclipse . convert . DoublesPair . of ( 1.2 , 2.5 ) ; org . testng . eclipse . convert . DoublesPair test = org . testng . eclipse . convert . DoublesPair . of ( base ) ; "<AssertPlaceHolder>" ; } of ( org . testng... | org . junit . Assert . assertSame ( base , test ) |
testBadWindowSize ( ) { org . openiot . gsn . beans . StreamSource ss = new org . openiot . gsn . beans . StreamSource ( ) . setAlias ( "mystream" ) . setAddressing ( addressing ) . setSqlQuery ( "select<sp>*<sp>from<sp>wrapper" ) . setRawHistorySize ( "10<sp>sec" ) ; "<AssertPlaceHolder>" ; } validate ( ) { java . lan... | org . junit . Assert . assertFalse ( ss . validate ( ) ) |
getActiveShards ( ) { org . apache . usergrid . persistence . qakka . core . CassandraClient cassandraClient = getInjector ( ) . getInstance ( org . apache . usergrid . persistence . qakka . core . CassandraClientImpl . class ) ; org . apache . usergrid . persistence . core . CassandraConfig cassandraConfig = getInject... | org . junit . Assert . assertTrue ( ( ( ( ( shards . size ( ) ) == 2 ) && ( shards . get ( 0 ) . equals ( shard1 ) ) ) && ( shards . get ( 1 ) . equals ( shard2 ) ) ) ) |
testPriorityValidNull ( ) { org . kie . workbench . common . stunner . bpmn . definition . property . connectors . Priority priority = new org . kie . workbench . common . stunner . bpmn . definition . property . connectors . Priority ( null ) ; java . util . Set < javax . validation . ConstraintViolation < org . kie .... | org . junit . Assert . assertTrue ( violations . isEmpty ( ) ) |
testProcessTickSize_StockTicker ( ) { com . sumzerotrading . marketdata . ib . IBLevel1QuoteProcessorTest . MockIBLevel1QuoteProcessor processor = buildMockQuoteProcessor ( false , false ) ; int size = 10 ; com . sumzerotrading . marketdata . ib . Level1QuoteData data = new com . sumzerotrading . marketdata . ib . Leve... | org . junit . Assert . assertEquals ( formattedValue , processor . formattedValue ) |
testFindUserDnWhenUserPatternFoundByUniqueIdentifier ( ) { conf . setVar ( HiveConf . ConfVars . HIVE_SERVER2_PLAIN_LDAP_USERDNPATTERN , "CN=%s,OU=org1,DC=foo,DC=bar" ) ; javax . naming . NamingEnumeration < javax . naming . directory . SearchResult > validResult = mockNamingEnumeration ( "CN=User1,OU=org1,DC=foo,DC=ba... | org . junit . Assert . assertEquals ( expected , actual ) |
notNullArg ( ) { org . pdfsam . ui . commons . OpenUrlRequest victim = new org . pdfsam . ui . commons . OpenUrlRequest ( "ChuckNorris" ) ; "<AssertPlaceHolder>" ; } getUrl ( ) { return url ; } | org . junit . Assert . assertEquals ( "ChuckNorris" , victim . getUrl ( ) ) |
test_get_configuration_type_by_id ( ) { java . util . List < org . ikasan . mapping . service . ConfigurationType > configurationTypes = this . xaMappingConfigurationDao . getAllConfigurationTypes ( ) ; for ( org . ikasan . mapping . service . ConfigurationType configurationType : configurationTypes ) { org . ikasan . ... | org . junit . Assert . assertEquals ( configurationType , configurationTypeSearched ) |
setParametersFromProperties_noParams ( ) { java . util . Properties propIn = new java . util . Properties ( ) ; propIn . put ( APPlatformController . KEY_OPERATION_ID , org . oscm . app . domain . OperationTest . OP_ID ) ; propIn . put ( APPlatformController . KEY_OPERATION_USER_ID , org . oscm . app . domain . Operati... | org . junit . Assert . assertTrue ( propOut . isEmpty ( ) ) |
testMultipleOrdering ( ) { java . util . List < io . datakernel . cube . DataItemResult > expected = asList ( new io . datakernel . cube . DataItemResult ( 1 , 3 , 30 , 25 , 0 ) , new io . datakernel . cube . DataItemResult ( 1 , 4 , 40 , 10 , 0 ) , new io . datakernel . cube . DataItemResult ( 1 , 5 , 23 , 48 , 0 ) , ... | org . junit . Assert . assertEquals ( expected , list ) |
test_parseSID_ssh_pk ( ) { com . deepsky . database . ora . JdbcDbUrl url1 = new com . deepsky . database . ora . DbUrlSID ( "test" , "test" , "localhost" , "1521" , "ORA1" ) ; url1 . setSshSettings ( new com . deepsky . database . ora . DbUrl . SshSettings ( ) { public java . lang . String getHost ( ) { return "n21.sa... | org . junit . Assert . assertEquals ( url1 , com . deepsky . database . ora . DbUrlUtil . parse ( url1 . serialize ( ) ) ) |
testNewChannel ( ) { try { org . hyperledger . fabric . sdk . Channel testChannel = org . hyperledger . fabric . sdk . ClientTest . hfclient . newChannel ( org . hyperledger . fabric . sdk . ClientTest . CHANNEL_NAME ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; org . jun... | org . junit . Assert . assertTrue ( ( ( testChannel != null ) && ( org . hyperledger . fabric . sdk . ClientTest . CHANNEL_NAME . equalsIgnoreCase ( testChannel . getName ( ) ) ) ) ) |
testStorageKeyForGenericEntity ( ) { org . apache . avro . generic . GenericData . Record position = new org . apache . avro . generic . GenericData . Record ( org . kitesdk . data . spi . TestNestedFieldPartitioning . schema . getField ( "position" ) . schema ( ) ) ; position . put ( "latitude" , 37.776 ) ; position .... | org . junit . Assert . assertEquals ( expected , key ) |
shouldReturnNegativeValueIfTheMembershipIsNotVoidedAndTheOtherIsAndTheyAreBothEnded ( ) { org . openmrs . Cohort cohort = new org . openmrs . Cohort ( ) ; org . openmrs . CohortMembership cm1 = new org . openmrs . CohortMembership ( 1 ) ; cm1 . setCohort ( cohort ) ; cm1 . setEndDate ( new java . util . Date ( ) ) ; or... | org . junit . Assert . assertTrue ( ( ( cm1 . compareTo ( cm2 ) ) < 0 ) ) |
testHostResolveAttempt ( ) { org . apache . tez . dag . app . dag . impl . TaskAttemptImpl . ScheduleTaskattemptTransition sta = new org . apache . tez . dag . app . dag . impl . TaskAttemptImpl . ScheduleTaskattemptTransition ( ) ; org . apache . hadoop . yarn . event . EventHandler eventHandler = mock ( org . apache ... | org . junit . Assert . assertEquals ( 0 , expected . size ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.