input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testPropertiesUsesContentTypeHeader ( ) { org . apache . camel . component . rabbitmq . RabbitMQProducer producer = new org . apache . camel . component . rabbitmq . RabbitMQProducer ( endpoint ) ; message . setHeader ( RabbitMQConstants . CONTENT_TYPE , "application/json" ) ; com . rabbitmq . client . AMQP . BasicProp... | org . junit . Assert . assertEquals ( "application/json" , props . getContentType ( ) ) |
testAMethodTakingAClassParameter ( ) { io . vertx . rxjava . codegen . extra . AnotherInterface another = io . vertx . rxjava . codegen . extra . AnotherInterface . create ( ) ; java . util . List list = another . methodWithClassParam ( java . util . ArrayList . class ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( list ) |
shouldReturnNullIfConvertFromElementIdsWithNullInput ( ) { final java . lang . Iterable < ? extends uk . gov . gchq . gaffer . data . element . id . EntityId > input = null ; final java . lang . Iterable < ? > output = uk . gov . gchq . gaffer . operation . util . OperationUtil . fromElementIds ( input ) ; "<AssertPlac... | org . junit . Assert . assertNull ( output ) |
shouldBeReturnDefaultValueOfMemory1 ( ) { "<AssertPlaceHolder>" ; } detect ( java . lang . String ) { for ( org . eclipse . che . ide . ext . runner . client . tabs . properties . panel . common . RAM size : org . eclipse . che . ide . ext . runner . client . tabs . properties . panel . common . RAM . values ( ) ) { if... | org . junit . Assert . assertThat ( 1000 , org . hamcrest . CoreMatchers . is ( org . eclipse . che . ide . ext . runner . client . tabs . properties . panel . common . RAM . detect ( 1 ) . getValue ( ) ) ) |
testFromStringNull ( ) { "<AssertPlaceHolder>" ; } fromString ( java . lang . String ) { if ( ( encodedStr == null ) || ( encodedStr . isEmpty ( ) ) ) { return null ; } final int zIdx = encodedStr . indexOf ( org . irods . jargon . core . utils . IRODSUriUserInfo . ZONE_INDICATOR ) ; final int pIdx = encodedStr . index... | org . junit . Assert . assertNull ( org . irods . jargon . core . utils . IRODSUriUserInfo . fromString ( null ) ) |
GetArrayOffset ( ) { java . lang . String st = "HTTP/1.1<sp>101<sp>Switching<sp>Protocols\r\nAccept:<sp>*/*\r\nSec-WebSocket-Accept:<sp>W5bRv0dwYtd1GPxLJnXACYizcbU=\r\nUser-Agent:<sp>litesockets\r\n\r\n" ; org . threadly . litesockets . buffers . SimpleMergedByteBuffers mbb = new org . threadly . litesockets . buffers ... | org . junit . Assert . assertEquals ( st , new java . lang . String ( ba ) ) |
linkedBinaryContentTest ( ) { org . dataconservancy . packaging . tool . impl . generator . PackageModelBuilderState state = bootstrap2 ( ) ; org . apache . jena . rdf . model . Property fileRelationProperty = state . domainObjects . createProperty ( "http://example.org/A#src" ) ; org . dataconservancy . packaging . to... | org . junit . Assert . assertEquals ( knownContent , content ) |
test_GetMenuItem_By_Name_Returns_MainMenuItem_When_ParentIsMainMenu ( ) { mmarquee . automation . controls . menu . AutomationMenuItem item = new mmarquee . automation . controls . menu . AutomationMenuItem ( new mmarquee . automation . controls . ElementBuilder ( mocked_element ) . addPattern ( collapse ) . addPattern... | org . junit . Assert . assertEquals ( targetElement , subItem . getElement ( ) ) |
testIsCachedDbNotExists ( ) { System . out . println ( ( ( getTestTraceHead ( "[MySQLCache.isCachedDb]" ) ) + "--------<sp>A<sp>not<sp>cached<sp>database<sp>is<sp>checked" ) ) ; com . telefonica . iot . cygnus . backends . mysql . MySQLCache cache = new com . telefonica . iot . cygnus . backends . mysql . MySQLCache ( ... | org . junit . Assert . assertTrue ( ( ! ( cache . isCachedDb ( dbName ) ) ) ) |
testEncodeWithFunc4 ( ) { java . lang . String toEncode = "ô" + "123" ; "2" "3" check digit 59 java . lang . String expected = ( ( ( ( ( ( ( ( com . google . zxing . oned . Code128WriterTestCase . QUIET_SPACE ) + ( com . google . zxing . oned . Code128WriterTestCase . START_CODE_B ) ) + ( com . google . zxing . oned . ... | org . junit . Assert . assertEquals ( expected , actual ) |
queryChannels ( ) { com . ctrip . xpipe . redis . console . alert . manager . List < com . ctrip . xpipe . redis . console . alert . AlertChannel > channels = policyManager . queryChannels ( alert ) ; com . ctrip . xpipe . redis . console . alert . manager . List < com . ctrip . xpipe . redis . console . alert . AlertC... | org . junit . Assert . assertEquals ( expected , channels ) |
whenEnterStopAndContinueResultRandomMessage ( ) { java . lang . String stopAndContinueKey = java . lang . String . format ( "stop%scontinue%stest" , sep , sep ) ; java . lang . System . setIn ( new java . io . ByteArrayInputStream ( stopAndContinueKey . getBytes ( ) ) ) ; try { new vkaretko . chat . ConsoleChat ( this ... | org . junit . Assert . assertThat ( this . out . toString ( ) . isEmpty ( ) , org . hamcrest . core . Is . is ( false ) ) |
testGetAccountId ( ) { java . lang . Long aId = bsc . getAccountId ( ) ; java . lang . Long expected = 102L ; "<AssertPlaceHolder>" ; } getAccountId ( ) { return _caller . getAccountId ( ) ; } | org . junit . Assert . assertEquals ( expected , aId ) |
failedStateMissingInputVariable ( ) { org . flowable . dmn . api . DecisionExecutionAuditContainer result = ruleService . createExecuteDecisionBuilder ( ) . decisionKey ( "decision" ) . executeWithAuditTrail ( ) ; "<AssertPlaceHolder>" ; } isFailed ( ) { return failed ; } | org . junit . Assert . assertEquals ( true , result . isFailed ( ) ) |
shouldNotGenerateSavingsAccountSchedulesForCenterWithoutActiveClients ( ) { createCenterAndGroupHierarchyWithNoClients ( aWeeklyMeeting ) ; org . mifos . accounts . productdefinition . business . SavingsOfferingBO savingsProduct = new org . mifos . domain . builders . SavingsProductBuilder ( ) . mandatory ( ) . withMan... | org . junit . Assert . assertTrue ( savingSchedules . isEmpty ( ) ) |
testDeleteSecurityRole ( ) { org . finra . herd . model . api . xml . SecurityRole securityRole = new org . finra . herd . model . api . xml . SecurityRole ( SECURITY_ROLE , DESCRIPTION ) ; when ( securityRoleService . deleteSecurityRole ( new org . finra . herd . model . api . xml . SecurityRoleKey ( SECURITY_ROLE ) )... | org . junit . Assert . assertEquals ( securityRole , result ) |
verifyValidResultStanza ( ) { org . apache . vysper . xmpp . stanza . Stanza stanza = new org . apache . vysper . xmpp . stanza . StanzaBuilder ( "iq" , org . apache . vysper . xmpp . protocol . NamespaceURIs . JABBER_CLIENT ) . addAttribute ( "type" , "result" ) . addAttribute ( "id" , "xmppping-1" ) . build ( ) ; "<A... | org . junit . Assert . assertTrue ( handler . verify ( stanza ) ) |
givenObject_whenInvokePrivateMethod_thenCorrect ( ) { java . lang . reflect . Method andPrivatedMethod = com . baeldung . java . reflection . Operations . class . getDeclaredMethod ( "privateAnd" , boolean . class , boolean . class ) ; andPrivatedMethod . setAccessible ( true ) ; com . baeldung . java . reflection . Op... | org . junit . Assert . assertFalse ( result ) |
testGetValue ( ) { java . lang . String expectedValue = "Some<sp>value" ; com . hazelcast . hibernate . serialization . Value value = new com . hazelcast . hibernate . serialization . Value ( null , 100L , expectedValue ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( expectedValue , value . getValue ( ) ) |
testCreate ( ) { org . oscarehr . common . model . BedType entity = new org . oscarehr . common . model . BedType ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( entity ) ; dao . persist ( entity ) ; "<AssertPlaceHolder>" ; } getId ( ) { return this . id ; } | org . junit . Assert . assertNotNull ( entity . getId ( ) ) |
testTanhAtanh ( ) { double [ ] epsilon = new double [ ] { 3.0E-16 , 2.0E-16 , 7.0E-16 , 4.0E-15 , 3.0E-14 , 4.0E-13 } ; for ( int maxOrder = 0 ; maxOrder < 6 ; ++ maxOrder ) { for ( double x = 0.1 ; x < 1.2 ; x += 0.001 ) { org . apache . commons . math4 . analysis . differentiation . DerivativeStructure dsX = new org ... | org . junit . Assert . assertEquals ( 0.0 , zero . getPartialDerivative ( n ) , epsilon [ n ] ) |
testCheckName ( ) { for ( final net . violet . platform . util . Pair < java . lang . String , java . lang . Boolean > test : net . violet . platform . api . converters . pojo . VioletPojoFixerTest . getTestSuite ( ) ) { final boolean ysn = net . violet . platform . api . converters . pojo . VioletPojoFixer . validateA... | org . junit . Assert . assertEquals ( test . getSecond ( ) , ysn ) |
testShortFolding ( ) { "<AssertPlaceHolder>" ; } build ( int ) { final java . util . Collection < com . yandex . yoctodb . util . UnsignedByteArray > elements = new java . util . LinkedList ( ) ; for ( int i = 0 ; i < 50 ; i ++ ) { if ( ( i % 2 ) == 0 ) elements . add ( com . yandex . yoctodb . util . UnsignedByteArray... | org . junit . Assert . assertTrue ( build ( 1000 ) . toString ( ) . contains ( java . lang . Integer . toString ( 1000 ) ) ) |
testEncodeDecodePingRequest ( ) { com . uber . tchannel . frames . PingRequestFrame pingRequestFrame = new com . uber . tchannel . frames . PingRequestFrame ( 42 ) ; com . uber . tchannel . codecs . TFrame tFrame = com . uber . tchannel . codecs . MessageCodec . encode ( ByteBufAllocator . DEFAULT , pingRequestFrame ) ... | org . junit . Assert . assertEquals ( newPingRequestFrame . getId ( ) , pingRequestFrame . getId ( ) ) |
orderTest ( ) { int size = 5 ; org . openscience . cdk . group . PermutationGroup sym = org . openscience . cdk . group . PermutationGroup . makeSymN ( size ) ; "<AssertPlaceHolder>" ; } factorial ( int ) { if ( i > 0 ) { return i * ( factorial ( ( i - 1 ) ) ) ; } else { return 1 ; } } | org . junit . Assert . assertEquals ( factorial ( size ) , sym . order ( ) ) |
testGetDoesNotReturnNull ( ) { org . apache . hadoop . hive . ql . util . JavaDataModel model = org . apache . hadoop . hive . ql . util . JavaDataModel . get ( ) ; "<AssertPlaceHolder>" ; } get ( ) { return org . apache . hadoop . hive . ql . session . SessionState . tss . get ( ) . state ; } | org . junit . Assert . assertNotNull ( model ) |
testCreate ( ) { org . oscarehr . common . model . Specialty entity = new org . oscarehr . common . model . Specialty ( ) ; entity . setId ( new org . oscarehr . common . model . SpecialtyPK ( "TA" , "00" ) ) ; entity . setSpecialtydesc ( "desc" ) ; dao . persist ( entity ) ; "<AssertPlaceHolder>" ; } find ( int , int ... | org . junit . Assert . assertNotNull ( dao . find ( new org . oscarehr . common . model . SpecialtyPK ( "TA" , "00" ) ) ) |
shouldObserveMaxFollowCount ( ) { int maxFollowCount = 50 ; com . mongodb . socialite . benchmark . graph . GraphGenerator generator = new com . mongodb . socialite . benchmark . graph . ZipZipfGraphGenerator ( maxFollowCount ) ; for ( int i = 0 ; i < 1000 ; i ++ ) { com . mongodb . socialite . benchmark . graph . Grap... | org . junit . Assert . assertTrue ( ( ( mutation . follows . size ( ) ) <= maxFollowCount ) ) |
subjectIsCorrect ( ) { java . lang . String subject = "CN=www.hsr.ch,<sp>OU=IT-Systems,<sp>O=Hochschule<sp>Rapperswil,<sp>L=Rapperswil,<sp>ST=St.<sp>Gallen,<sp>C=CH" ; "<AssertPlaceHolder>" ; } getSubject ( ) { return certificate . getSubjectX500Principal ( ) . toString ( ) ; } | org . junit . Assert . assertEquals ( subject , certificate . getSubject ( ) ) |
testException ( ) { final org . synchronoss . cloud . nio . multipart . util . collect . AbstractIteratorTest . SomeUncheckedException exception = new org . synchronoss . cloud . nio . multipart . util . collect . AbstractIteratorTest . SomeUncheckedException ( ) ; java . util . Iterator < java . lang . Integer > iter ... | org . junit . Assert . assertSame ( exception , e ) |
testSerialization ( ) { org . apache . kylin . measure . topn . TopNCounter < org . apache . kylin . common . util . ByteArray > vs = new org . apache . kylin . measure . topn . TopNCounter < org . apache . kylin . common . util . ByteArray > ( 50 ) ; java . lang . Integer [ ] stream = new org . apache . kylin . measur... | org . junit . Assert . assertEquals ( vs . toString ( ) , vsNew . toString ( ) ) |
testRun_recursesOverTree ( ) { org . apache . calcite . rel . RelNode node2a = org . mockito . Mockito . mock ( org . apache . calcite . rel . RelNode . class ) ; org . apache . calcite . rel . RelNode node2b = org . mockito . Mockito . mock ( org . apache . calcite . rel . RelNode . class ) ; org . apache . calcite . ... | org . junit . Assert . assertSame ( inNode , result ) |
testIsLessThan ( ) { final org . apache . isis . applib . value . Money m1 = new org . apache . isis . applib . value . Money ( 98 , "pds" ) ; final org . apache . isis . applib . value . Money m2 = new org . apache . isis . applib . value . Money ( 100 , "pds" ) ; "<AssertPlaceHolder>" ; } isLessThan ( org . apache . ... | org . junit . Assert . assertTrue ( m1 . isLessThan ( m2 ) ) |
getContext_returnSamplePeriodic ( ) { java . lang . String expected = "Sample.Periodic" ; java . lang . String context = sampledValue . getContext ( ) ; "<AssertPlaceHolder>" ; } getContext ( ) { return context ; } | org . junit . Assert . assertThat ( context , org . hamcrest . CoreMatchers . equalTo ( expected ) ) |
testListenerAttachOnDisabledChannel ( ) { final java . util . ArrayList < java . lang . Boolean > attachSequence = new java . util . ArrayList ( ) ; final org . eclipse . kura . channel . listener . ChannelListener listener = new org . eclipse . kura . channel . listener . ChannelListener ( ) { @ org . eclipse . kura .... | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( ) , attachSequence ) |
testGetFileExtensionForNullMimeType ( ) { ddf . mime . custom . CustomMimeTypeResolver resolver = new ddf . mime . custom . CustomMimeTypeResolver ( ) ; resolver . setCustomMimeTypes ( new java . lang . String [ ] { "nitf=image/nitf" , "ntf=image/nitf" } ) ; java . lang . String fileExtension = resolver . getFileExtens... | org . junit . Assert . assertEquals ( null , fileExtension ) |
testGetObjectDataType ( ) { dataTypeDao . changeDataType ( userId , objectId , objectType , dataType ) ; org . sagebionetworks . repo . model . DataType resultType = dataTypeDao . getObjectDataType ( objectId , objectType ) ; "<AssertPlaceHolder>" ; } getObjectDataType ( java . lang . String , org . sagebionetworks . r... | org . junit . Assert . assertEquals ( dataType , resultType ) |
shouldRetrunNullWhenGetCustomTranslationIfCustomTranslationIsNull ( ) { java . lang . String key = "key" ; java . util . Locale locale = new java . util . Locale ( "pl" ) ; given ( customTranslationCacheService . getCustomTranslation ( key , locale . getLanguage ( ) ) ) . willReturn ( null ) ; java . lang . String tran... | org . junit . Assert . assertEquals ( null , translation ) |
testParseAndroidSdkOffer ( ) { org . restcomm . media . core . sdp . SessionDescription sdp ; sdp = org . restcomm . media . core . sdp . SessionDescriptionParser . parse ( org . restcomm . media . core . sdp . SessionDescriptionParserTest . androidSdkOffer ) ; org . restcomm . media . core . sdp . fields . MediaDescri... | org . junit . Assert . assertNotNull ( audio ) |
testDumpContains ( ) { java . lang . String input = "list<sp>contains<sp>\"b\"" ; java . lang . String expected = "list<sp>contains<sp>\"b\"" ; org . drools . compiler . lang . descr . ConstraintConnectiveDescr descr = parse ( input ) ; java . lang . String result = dumper . dump ( descr ) ; "<AssertPlaceHolder>" ; } d... | org . junit . Assert . assertEquals ( expected , result ) |
testNS1_0 ( ) { writeXML ( org . apache . aries . blueprint . plugin . EnableAnnotationTest . NS_TX1_0 , "true" ) ; "<AssertPlaceHolder>" ; } getEnableAnnotationTx1 ( ) { return ( ( org . w3c . dom . Node ) ( xpath . evaluate ( "/blueprint/enable-annotations" , document , XPathConstants . NODE ) ) ) ; } | org . junit . Assert . assertNull ( getEnableAnnotationTx1 ( ) ) |
ioReaderTest ( ) { com . vladsch . flexmark . parser . Parser parser = com . vladsch . flexmark . parser . Parser . builder ( ) . build ( ) ; java . io . InputStream input1 = com . vladsch . flexmark . spec . SpecReader . getSpecInputStream ( ) ; com . vladsch . flexmark . util . ast . Node document1 ; java . io . Inpu... | org . junit . Assert . assertEquals ( renderer . render ( document2 ) , renderer . render ( document1 ) ) |
test_containsPointClosedCircle ( ) { net . osmand . data . Multipolygon testee = new net . osmand . data . MultipolygonBuilder ( ) . addOuterWay ( scale ( 4 , closedBaseCircle ) ) . build ( ) ; net . osmand . data . LatLon center = testee . getCenterPoint ( ) ; "<AssertPlaceHolder>" ; } containsPoint ( net . osmand . d... | org . junit . Assert . assertTrue ( testee . containsPoint ( center ) ) |
rollbackShouldWork ( ) { java . sql . Connection writer = java . sql . DriverManager . getConnection ( getJDBCUrl ( ) ) ; writer . setAutoCommit ( false ) ; writer . createStatement ( ) . execute ( ( ( "CREATE<sp>(n:TestRollbackShouldWork_" + ( secureMode . toString ( ) ) ) + "<sp>{value:\"AZERTYUIOP\"})" ) ) ; writer ... | org . junit . Assert . assertFalse ( rs . next ( ) ) |
testReadFrameExceedingLimit ( ) { final org . apache . hc . core5 . http2 . impl . nio . FrameInputBuffer inBuffer = new org . apache . hc . core5 . http2 . impl . nio . FrameInputBuffer ( ( 16 * 1024 ) ) ; final org . apache . hc . core5 . http2 . ReadableByteChannelMock readableChannel = new org . apache . hc . core5... | org . junit . Assert . assertEquals ( null , inBuffer . read ( readableChannel ) ) |
testContext ( ) { com . github . davidmoten . rtree . RTree < java . lang . Object , com . github . davidmoten . rtree . geometry . Geometry > tree = com . github . davidmoten . rtree . RTree . create ( ) ; "<AssertPlaceHolder>" ; } context ( ) { return context ; } | org . junit . Assert . assertNotNull ( tree . context ( ) ) |
testOrganizationNames ( eu . trentorise . opendata . jackan . CkanClient ) { java . util . List < java . lang . String > gl = client . getOrganizationNames ( ) ; "<AssertPlaceHolder>" ; } getOrganizationNames ( ) { return organizationNames ; } | org . junit . Assert . assertTrue ( ( ( gl . size ( ) ) > 0 ) ) |
testLeeg ( ) { final nl . bzk . brp . util . hisvolledig . kern . PersoonHisVolledigImplBuilder builder = new nl . bzk . brp . util . hisvolledig . kern . PersoonHisVolledigImplBuilder ( nl . bzk . brp . model . algemeen . stamgegeven . kern . SoortPersoon . INGESCHREVENE ) ; final nl . bzk . brp . model . hisvolledig ... | org . junit . Assert . assertTrue ( ( ( brpVoornamen . size ( ) ) == 0 ) ) |
testGetTitle ( ) { final java . lang . String errorKey = org . drools . workbench . screens . guided . dtable . client . resources . i18n . GuidedDecisionTableErraiConstants . OperatorPage_Operator ; final java . lang . String errorMessage = "Title" ; when ( translationService . format ( errorKey ) ) . thenReturn ( err... | org . junit . Assert . assertEquals ( errorMessage , title ) |
testLineWrap ( ) { java . lang . String templates = "array(values)<sp>::=<sp><<int[]<sp>a<sp>=<sp>{<sp><values;<sp>wrap=\"\\n\",<sp>separator=\",\"><sp>};>>" + ( newline ) ; writeFile ( tmpdir , "t.stg" , templates ) ; org . stringtemplate . v4 . test . org . stringtemplate . v4 . STGroup group = new org . stringtempla... | org . junit . Assert . assertEquals ( expecting , result ) |
testStartRgxOp ( ) { org . v8LogScanner . LocalTCPLogScanner . ClientsManager manager = new org . v8LogScanner . LocalTCPLogScanner . ClientsManager ( ) ; org . v8LogScanner . LocalTCPLogScanner . V8LogScannerClient localClient = manager . localClient ( ) ; java . lang . String logFileName = constructor . addEXCP ( ) .... | org . junit . Assert . assertEquals ( 3 , logs . size ( ) ) |
testShouldReplay ( ) { final nl . minvenj . nfi . storm . kafka . fail . FailHandler subject = new nl . minvenj . nfi . storm . kafka . fail . ReliableFailHandler ( ) ; final nl . minvenj . nfi . storm . kafka . util . KafkaMessageId id = new nl . minvenj . nfi . storm . kafka . util . KafkaMessageId ( 1 , 1234 ) ; "<A... | org . junit . Assert . assertTrue ( subject . shouldReplay ( id ) ) |
testGetWhenPanelIsEmpty ( ) { final org . phenotips . panels . rest . internal . PanelData data = new org . phenotips . panels . rest . internal . PanelData ( this . presentSet1 , java . util . Collections . emptySet ( ) , java . util . Collections . emptySet ( ) ) ; this . genePanelLoader . get ( data ) ; "<AssertPlac... | org . junit . Assert . assertEquals ( 0 , this . genePanelLoader . size ( ) ) |
testGetIndirectMoveSq_ConstraintsA1_6 ( ) { resultSq = eubos . board . Direction . getIndirectMoveSq ( Direction . downLeft , inputSq ) ; "<AssertPlaceHolder>" ; } getIndirectMoveSq ( eubos . board . Direction , com . fluxchess . jcpi . models . GenericPosition ) { com . fluxchess . jcpi . models . GenericPosition retV... | org . junit . Assert . assertTrue ( ( ( resultSq ) == null ) ) |
testGetOwnedProperty1 ( ) { "<AssertPlaceHolder>" ; } size ( ) { org . dresdenocl . essentialocl . standardlibrary . OclInteger result = null ; result = checkInvalid ( org . dresdenocl . essentialocl . EssentialOclPlugin . getOclLibraryProvider ( ) . getOclLibrary ( ) . getOclInteger ( ) , this ) ; if ( result == null ... | org . junit . Assert . assertEquals ( msg , 0 , properties . size ( ) ) |
testMethodAnnotations ( ) { org . jboss . weld . tests . annotations . weld1131 . MyAnnotation myAnnotation = foo . getClass ( ) . getMethod ( "getBar" ) . getAnnotation ( org . jboss . weld . tests . annotations . weld1131 . MyAnnotation . class ) ; "<AssertPlaceHolder>" ; } getAnnotation ( java . lang . Class ) { ret... | org . junit . Assert . assertNotNull ( myAnnotation ) |
testConvert ( ) { java . lang . Long languageId = 1L ; org . lnu . is . domain . language . Language language = new org . lnu . is . domain . language . Language ( ) ; language . setId ( languageId ) ; java . lang . Long personId = 2L ; org . lnu . is . domain . person . Person person = new org . lnu . is . domain . pe... | org . junit . Assert . assertEquals ( expected , actual ) |
testMissing ( ) { org . apache . uima . jcas . JCas jCas = uk . gov . dstl . baleen . uima . testing . JCasSingleton . getJCasInstance ( ) ; java . lang . Class < ? > c = uk . gov . dstl . baleen . uima . utils . TypeUtils . getType ( "Missing" , jCas ) ; "<AssertPlaceHolder>" ; } getType ( java . lang . String , org .... | org . junit . Assert . assertEquals ( null , c ) |
testReadWriteComponentType ( ) { java . io . InputStream is = getClass ( ) . getResourceAsStream ( "CalculatorImpl.componentType" ) ; org . apache . tuscany . sca . assembly . ComponentType componentType = ( ( org . apache . tuscany . sca . assembly . ComponentType ) ( org . apache . tuscany . sca . binding . ws . xml ... | org . junit . Assert . assertNotNull ( componentType ) |
getOwner ( ) { java . nio . file . Path rootPath = java . nio . file . Paths . get ( hdfs . jsr203 . TestFiles . clusterUri ) ; java . nio . file . Path path = java . nio . file . Files . createTempFile ( rootPath , "test" , "tmp" ) ; "<AssertPlaceHolder>" ; } get ( int ) { return getName ( index ) ; } | org . junit . Assert . assertNotNull ( java . nio . file . Files . getOwner ( path ) ) |
learnFile ( ) { org . xm . word2vec . vec . Learn learn = new org . xm . word2vec . vec . Learn ( ) ; long start = java . lang . System . currentTimeMillis ( ) ; learn . learnFile ( new java . io . File ( org . xm . word2vec . vec . LearnTest . RAW_CORPUS_SPLIT ) ) ; System . out . println ( ( "use<sp>time<sp>" + ( ( j... | org . junit . Assert . assertTrue ( ( learn != null ) ) |
type13_tip_eji_wsq ( ) { org . jnbis . api . model . Nist decoded = decode ( org . jnbis . AnsiReferencesTest . FILES [ 25 ] ) ; commonAssert ( decoded ) ; "<AssertPlaceHolder>" ; } getVariableResLatentImages ( ) { return variableResolutionLatentImages ; } | org . junit . Assert . assertEquals ( 5 , decoded . getVariableResLatentImages ( ) . size ( ) ) |
testSerializeVOPaymentType ( ) { org . oscm . internal . vo . VOPaymentType voIn = new org . oscm . internal . vo . VOPaymentType ( ) ; voIn . setCollectionType ( PaymentCollectionType . ORGANIZATION ) ; voIn . setPaymentTypeId ( org . oscm . domobjects . CREDIT_CARD ) ; createTriggerProcessWithParam ( voIn ) ; org . o... | org . junit . Assert . assertTrue ( result , ( ( result . length ( ) ) == 0 ) ) |
insufficientCapacity ( ) { java . util . List < org . goldenorb . OrbTracker > orbTrackers = new java . util . ArrayList < org . goldenorb . OrbTracker > ( ) ; org . goldenorb . conf . OrbConfiguration conf = new org . goldenorb . conf . OrbConfiguration ( true ) ; conf . setOrbRequestedPartitions ( 6 ) ; conf . setOrb... | org . junit . Assert . assertNull ( ret ) |
testCreateWithIntegerReturnsInteger ( ) { final org . jsoar . kernel . symbols . Symbol s = org . jsoar . kernel . symbols . Symbols . create ( syms , 98 ) ; "<AssertPlaceHolder>" ; } asInteger ( ) { return null ; } | org . junit . Assert . assertEquals ( 98 , s . asInteger ( ) . getValue ( ) ) |
getName ( ) { final com . rapid7 . client . dcerpc . msrrp . dto . RegistryValue value = new com . rapid7 . client . dcerpc . msrrp . dto . RegistryValue ( "test" , com . rapid7 . client . dcerpc . msrrp . dto . RegistryValueType . REG_SZ , new byte [ ] { } ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; } | org . junit . Assert . assertEquals ( "test" , value . getName ( ) ) |
getPatients_shouldNotGetPatientsByZeroLength_SignatureNo2 ( ) { java . util . List < org . openmrs . Patient > patients = dao . getPatients ( "Saruman" , 0 , 0 ) ; "<AssertPlaceHolder>" ; } size ( ) { return getMemberships ( ) . stream ( ) . filter ( ( m ) -> ! ( m . getVoided ( ) ) ) . collect ( java . util . stream .... | org . junit . Assert . assertEquals ( 0 , patients . size ( ) ) |
testAvroFirstN ( ) { org . apache . crunch . impl . spark . SparkPipeline pipeline = new org . apache . crunch . impl . spark . SparkPipeline ( "local" , "aggregator" ) ; org . apache . crunch . PCollection < java . lang . String > set1 = pipeline . read ( org . apache . crunch . io . From . textFile ( tempDir . copyRe... | org . junit . Assert . assertEquals ( 5 , aggregate . size ( ) ) |
removeAll ( ) { cache . put ( org . cache2k . test . core . BasicCacheOperationsWithoutCustomizationsTest . KEY , org . cache2k . test . core . BasicCacheOperationsWithoutCustomizationsTest . VALUE ) ; cache . put ( org . cache2k . test . core . BasicCacheOperationsWithoutCustomizationsTest . OTHER_KEY , org . cache2k ... | org . junit . Assert . assertFalse ( cache . keys ( ) . iterator ( ) . hasNext ( ) ) |
findOneTest_with_version_null_test_ver ( ) { com . redhat . lightblue . savedsearch . SavedSearchCache cache = new com . redhat . lightblue . savedsearch . SavedSearchCache ( null ) ; foundDocs = new java . util . ArrayList < com . redhat . lightblue . util . JsonDoc > ( ) ; foundDocs . add ( makeSearch ( "testSearch" ... | org . junit . Assert . assertTrue ( ( doc instanceof com . fasterxml . jackson . databind . node . ObjectNode ) ) |
testLimitedStreamChooser ( ) { java . util . Map < java . net . SocketAddress , java . util . Set < java . lang . String > > streamDistribution = new java . util . HashMap < java . net . SocketAddress , java . util . Set < java . lang . String > > ( ) ; java . util . Set < java . lang . String > streams = new java . ut... | org . junit . Assert . assertEquals ( 1 , choosenStreams . size ( ) ) |
forEach ( ) { java . lang . Integer [ ] ints = new java . lang . Integer [ ] { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 } ; org . organicdesign . fp . xform . Xform < java . lang . Integer > seq = org . organicdesign . fp . xform . Xform . of ( java . util . Arrays . asList ( ints ) ) ; final java . util . List < java . lang ... | org . junit . Assert . assertArrayEquals ( ints , output . toArray ( ) ) |
testParseMatchMapNullErr ( ) { queriesString = "type=node&enabled=true&status=established&match=port01" ; target = new org . o3project . odenos . core . component . network . flow . query . OFPFlowQuery ( queriesString ) ; "<AssertPlaceHolder>" ; } parse ( ) { if ( ! ( super . parse ( ) ) ) { return false ; } if ( ! ( ... | org . junit . Assert . assertThat ( target . parse ( ) , org . hamcrest . CoreMatchers . is ( false ) ) |
restartAndSucceed ( org . jboss . as . arquillian . container . ManagementClient ) { org . hibernate . search . test . integration . jsr352 . massindexing . test . util . ManagementClientJobTestUtil jobTestUtil = new org . hibernate . search . test . integration . jsr352 . massindexing . test . util . ManagementClientJ... | org . junit . Assert . assertEquals ( BatchStatus . COMPLETED , executionStatus ) |
testExpression15 ( ) { java . lang . String expr = "2.5333333333<sp>*<sp>17.41<sp>+<sp>(12*2)^log(2.764)" ; double expected = ( 2.5333333333 * 17.41 ) + ( java . lang . Math . Math . pow ( ( 12 * 2 ) , java . lang . Math . Math . log ( 2.764 ) ) ) ; net . objecthunter . exp4j . Expression e = new net . objecthunter . e... | org . junit . Assert . assertTrue ( ( expected == ( e . evaluate ( ) ) ) ) |
assertIsNullParameter ( ) { org . apache . shardingsphere . shardingproxy . transport . mysql . packet . command . query . binary . execute . MySQLNullBitmap actual = new org . apache . shardingsphere . shardingproxy . transport . mysql . packet . command . query . binary . execute . MySQLNullBitmap ( 8 , 0 ) ; actual ... | org . junit . Assert . assertTrue ( actual . isNullParameter ( 0 ) ) |
handle_shouldNotTrimEmptyStringsForAllowLeadingOrTrailingWhitespaceAnnotation ( ) { org . openmrs . api . handler . OpenmrsObjectSaveHandlerTest . SomeClass obj = new org . openmrs . api . handler . OpenmrsObjectSaveHandlerTest . SomeClass ( null , "<sp>" ) ; new org . openmrs . api . handler . OpenmrsObjectSaveHandler... | org . junit . Assert . assertNotNull ( obj . getDescription ( ) ) |
emptyRangeQuery ( ) { com . github . ftrossbach . kiqr . client . service . GenericBlockingKiqrClient client = new com . github . ftrossbach . kiqr . client . service . rest . GenericBlockingRestKiqrClientImpl ( "localhost" , port ) ; com . github . ftrossbach . kiqr . client . service . rest . Map < java . lang . Stri... | org . junit . Assert . assertThat ( result . entrySet ( ) , is ( empty ( ) ) ) |
testCodec ( ) { com . ctrip . xpipe . redis . console . migration . model . impl . DefaultShardMigrationResult result = new com . ctrip . xpipe . redis . console . migration . model . impl . DefaultShardMigrationResult ( ) ; for ( com . ctrip . xpipe . redis . console . migration . model . ShardMigrationStep step : com... | org . junit . Assert . assertEquals ( result , decodeObj ) |
testAnonIncludeArgMismatch ( ) { org . stringtemplate . v4 . test . STErrorListener errors = new org . stringtemplate . v4 . test . ErrorBuffer ( ) ; java . lang . String template = "<a:{foo}>" ; org . stringtemplate . v4 . test . STGroup g = new org . stringtemplate . v4 . test . STGroup ( ) ; g . errMgr = new org . s... | org . junit . Assert . assertEquals ( expected , errors . toString ( ) ) |
testHasHealthyResultFalse ( ) { _results . addHealthCheckResult ( com . bazaarvoice . ostrich . healthcheck . DefaultHealthCheckResultsTest . UNHEALTHY ) ; "<AssertPlaceHolder>" ; } hasHealthyResult ( ) { return ( getHealthyResult ( ) ) != null ; } | org . junit . Assert . assertFalse ( _results . hasHealthyResult ( ) ) |
testBuildWithDisabledDefaultConstraints ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . specialty . Specialty specialty = new org . lnu . is . domain . specialty . Specialty ( ) ; org . lnu . is . domain . timeperiod . TimePeriod timePeriod = new org . lnu . is . domain . tim... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
testGetFromAnotherThreadWithSpinSleepNanos ( ) { final com . allanbank . mongodb . client . FutureCallback < java . lang . Object > callback = new com . allanbank . mongodb . client . FutureCallback < java . lang . Object > ( com . allanbank . mongodb . LockType . LOW_LATENCY_SPIN ) ; final java . lang . Object result ... | org . junit . Assert . assertSame ( result , callback . get ( ) ) |
testIfUserCanStopExistingPlaybackQuery ( ) { com . datasift . client . DataSiftResult stop_query = datasift . historics ( ) . stop ( id , reason ) . sync ( ) ; "<AssertPlaceHolder>" ; } isSuccessful ( ) { return ( ( ( ( ! ( failed ) ) && ( ( response ) != null ) ) && ( ( error ) == null ) ) && ( ( response . status ( )... | org . junit . Assert . assertTrue ( stop_query . isSuccessful ( ) ) |
testNestedKeys ( ) { java . util . Map < java . lang . String , java . lang . Object > input = new java . util . HashMap ( ) ; java . util . Map < java . lang . String , java . lang . Object > nested = new java . util . HashMap ( ) ; nested . put ( "bar" , "baz" ) ; input . put ( "foo" , nested ) ; java . util . Map < ... | org . junit . Assert . assertEquals ( expected , actual ) |
testTimestampConversion ( ) { com . splicemachine . derby . impl . load . Connection conn = methodWatcher . getOrCreateConnection ( ) ; conn . setSchema ( com . splicemachine . derby . impl . load . ImportErrorIT . schema . schemaName ) ; java . lang . String inputFilePath = ( getResourceDirectory ( ) ) + "ts.csv" ; tr... | org . junit . Assert . assertEquals ( expectedResult , TestUtils . FormattedResult . ResultFactory . toString ( rs ) ) |
testDataDrivenTestWithMissingDatafile ( ) { java . io . File dir = tempDir ( ) ; tempScript ( "suite.mts" , "Test<sp>foo.mt<sp>RunWith" , dir ) ; com . gorillalogic . monkeytalk . processor . SuiteFlattener flattener = new com . gorillalogic . monkeytalk . processor . SuiteFlattener ( dir ) ; "<AssertPlaceHolder>" ; } ... | org . junit . Assert . assertThat ( flattener . flatten ( "suite.mts" ) , org . hamcrest . CoreMatchers . is ( 1 ) ) |
testClose ( ) { final java . net . InetSocketAddress addr = com . allanbank . mongodb . client . connection . sharded . ShardedConnectionFactoryTest . ourServer . getInetSocketAddress ( ) ; final java . lang . String serverName = com . allanbank . mongodb . util . ServerNameUtils . normalize ( addr ) ; com . allanbank ... | org . junit . Assert . assertEquals ( 2 , servers . size ( ) ) |
testClassJavaDoc ( ) { final java . lang . String json = "{<sp>'type':<sp>'Polygon',<sp>'coordinates':<sp>[<sp>" + ( "[<sp>[100.0,<sp>0.0],<sp>[101.0,<sp>0.0],<sp>[101.0,<sp>1.0],<sp>[100.0,<sp>1.0],<sp>[100.0,<sp>0.0]<sp>]," + "[<sp>[100.2,<sp>0.2],<sp>[100.8,<sp>0.2],<sp>[100.8,<sp>0.8],<sp>[100.2,<sp>0.8],<sp>[100.2... | org . junit . Assert . assertEquals ( jsonDoc , geoJsonPolygon ) |
testJoinRightOneMatch ( ) { com . huawei . streaming . common . Pair < com . huawei . streaming . event . IEvent [ ] [ ] , com . huawei . streaming . event . IEvent [ ] [ ] > prepare1 = com . huawei . streaming . process . join . SupportDataPrepare . dataPrepare ( SupportConst . I_TWO , SupportConst . I_THREE ) ; com .... | org . junit . Assert . assertArrayEquals ( expSet . toArray ( new com . huawei . streaming . common . MultiKey [ expSet . size ( ) ] ) , result . getFirst ( ) . toArray ( new com . huawei . streaming . common . MultiKey [ result . getFirst ( ) . size ( ) ] ) ) |
testCancelTimeout ( ) { final int REAL_DELAY = 100 ; eventLoop . registerTimer ( ( REAL_DELAY - 50 ) , serverHandler ) ; edu . brown . protorpc . NIOEventLoopTest . TestHandler handler2 = new edu . brown . protorpc . NIOEventLoopTest . TestHandler ( ) ; eventLoop . registerTimer ( REAL_DELAY , handler2 ) ; eventLoop . ... | org . junit . Assert . assertEquals ( 0 , serverHandler . timerExpiredCount ) |
testEmpty ( ) { final java . io . InputStream stream = getClass ( ) . getResourceAsStream ( "/net/meisen/dissertation/model/dimensions/config/DIMEMPTY.xml" ) ; final java . util . Map < java . lang . String , net . meisen . dissertation . model . dimensions . IDimension > dimensions = dimensionHandler . loadDimensions ... | org . junit . Assert . assertEquals ( 0 , dimensions . size ( ) ) |
sendToMdb ( ) { try ( final javax . jms . JMSContext context = cf . createContext ( ) ) { context . createProducer ( ) . send ( destination , org . apache . openejb . activemq . JMS2AMQTest . TEXT ) ; "<AssertPlaceHolder>" ; } catch ( final javax . jms . JMSRuntimeException ex ) { org . junit . Assert . fail ( ex . get... | org . junit . Assert . assertTrue ( org . apache . openejb . activemq . JMS2AMQTest . Listener . sync ( ) ) |
prefixOf2 ( ) { com . foundationdb . qp . row . ValuesHKey key = createHKey ( "item" ) ; key . valueAt ( 0 ) . putInt32 ( 42 ) ; key . valueAt ( 1 ) . putInt32 ( 51 ) ; com . foundationdb . qp . row . ValuesHKey orderKey = createHKey ( "order" ) ; orderKey . valueAt ( 0 ) . putInt32 ( 42 ) ; orderKey . valueAt ( 1 ) . ... | org . junit . Assert . assertTrue ( orderKey . prefixOf ( key ) ) |
getEventsWhenNoPreferences ( ) { org . xwiki . notifications . preferences . NotificationPreference pref1 = mock ( org . xwiki . notifications . preferences . NotificationPreference . class ) ; when ( pref1 . getProperties ( ) ) . thenReturn ( java . util . Collections . singletonMap ( NotificationPreferenceProperty . ... | org . junit . Assert . assertEquals ( 0 , results . size ( ) ) |
testResolveMethod9 ( ) { java . lang . Class < ? > declareClass = java . lang . Class . forName ( "java.lang.Math" ) ; java . lang . String methodName = "log" ; java . lang . Class < ? > [ ] paramTypes = new java . lang . Class < ? > [ ] { float . class } ; java . lang . reflect . Method actualMethod = com . huawei . s... | org . junit . Assert . assertEquals ( expectedMethod , actualMethod ) |
testAddIncludesExcludeInDefault ( ) { org . walkmod . commands . AddTransformationCommand command = new org . walkmod . commands . AddTransformationCommand ( "imports-cleaner" , null , false , null , null , null , null , false ) ; java . io . File file = new java . io . File ( "src/test/resources/yaml/addIncludesInDefa... | org . junit . Assert . assertTrue ( output . contains ( "foo" ) ) |
testReqRouterTcpPoll ( ) { for ( int index = 0 ; index < 10000 ; ++ index ) { long start = java . lang . System . currentTimeMillis ( ) ; java . util . List < org . zeromq . TooManyOpenFilesTester . Pair > pairs = new java . util . ArrayList ( ) ; for ( int idx = 0 ; idx < 20 ; ++ idx ) { org . zeromq . TooManyOpenFile... | org . junit . Assert . assertThat ( finished , org . hamcrest . CoreMatchers . is ( true ) ) |
password ( ) { final io . trane . ndbc . Config c = io . trane . ndbc . Config . create ( dataSourceSupplierClass , host , port , user ) ; final java . lang . String password = "password" ; "<AssertPlaceHolder>" ; } password ( java . lang . String ) { return password ( java . util . Optional . of ( password ) ) ; } | org . junit . Assert . assertEquals ( java . util . Optional . of ( password ) , c . password ( password ) . password ( ) ) |
canWriteFileItems ( ) { java . util . List < java . lang . String > errors = new java . util . ArrayList < java . lang . String > ( ) ; org . apache . commons . fileupload . FileItem file2FileItem = mock ( org . apache . commons . fileupload . FileItem . class , "file2" ) ; org . apache . commons . fileupload . FileIte... | org . junit . Assert . assertEquals ( 0 , errors . size ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.