input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
should_query_with_att_from_mapped_super ( ) { final java . lang . String name = "should_create_date_criteria" ; final java . lang . String superName = "super_should_create_date_criteria" ; final org . apache . deltaspike . data . test . domain . Simple simple = new org . apache . deltaspike . data . test . domain . Sim... | org . junit . Assert . assertEquals ( superName , result . getSuperName ( ) ) |
testSerializeServerEntry ( ) { org . apache . directory . api . ldap . model . entry . Entry entry = new org . apache . directory . api . ldap . model . entry . DefaultEntry ( org . apache . directory . server . core . partition . impl . btree . jdbm . ServerEntrySerializerTest . schemaManager , "" , "objectClass:<sp>t... | org . junit . Assert . assertEquals ( entry , result ) |
getColorThemeFromSkinFileWithException ( ) { java . lang . Exception exception = new org . xwiki . lesscss . compiler . LESSCompilerException ( "Exception<sp>with<sp>LESS" , null ) ; when ( lessColorThemeConverter . getColorThemeFromSkinFile ( "style.less" , false ) ) . thenThrow ( exception ) ; org . xwiki . lesscss .... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
testProcessStatusReady ( ) { when ( mockEvent . getBody ( ) ) . thenReturn ( "frank" . getBytes ( ) ) ; org . apache . flume . Sink . Status status = mockKafkaSink . process ( ) ; verify ( mockChannel , times ( 1 ) ) . getTransaction ( ) ; verify ( mockChannel , times ( 1 ) ) . take ( ) ; verify ( mockProducer , times ... | org . junit . Assert . assertEquals ( Status . READY , status ) |
checkMessageMethod ( ) { java . lang . String str = "test" ; info . smart_tools . smartactors . endpoint . interfaces . ideserialize_strategy . exceptions . DeserializationException exception = new info . smart_tools . smartactors . endpoint . interfaces . ideserialize_strategy . exceptions . DeserializationException (... | org . junit . Assert . assertEquals ( exception . getMessage ( ) , str ) |
testNN_AtmCorrCheckOutputNode ( ) { int numNodesInput = 18 ; int numNodesOutput = 10 ; int checkOutputNode = org . esa . s3tbx . fub . wew . util . NN_YellowSubstance . compute ( in , numNodesInput , out , numNodesOutput , width , mask , 0 , a ) ; "<AssertPlaceHolder>" ; } compute ( float [ ] [ ] , int , float [ ] [ ] ... | org . junit . Assert . assertEquals ( ( - 2 ) , checkOutputNode ) |
testAddNotification_nonNotificationTx_assertTxNotAdded ( ) { org . nhindirect . monitor . processor . impl . DefaultDuplicateNotificationStateManager mgr = new org . nhindirect . monitor . processor . impl . DefaultDuplicateNotificationStateManager ( ) ; mgr . setDao ( notifDao ) ; org . nhindirect . common . tx . mode... | org . junit . Assert . assertEquals ( 0 , addedAddr . size ( ) ) |
scriptBodyWithoutReplName ( ) { java . lang . String text = "12345678" ; "<AssertPlaceHolder>" ; } getScriptBody ( java . lang . String ) { if ( text == null ) { return null ; } java . lang . String magic = org . apache . zeppelin . notebook . Paragraph . getRequiredReplName ( text ) ; if ( magic == null ) { return tex... | org . junit . Assert . assertEquals ( text , org . apache . zeppelin . notebook . Paragraph . getScriptBody ( text ) ) |
testDeactivateExistingActivation ( ) { java . lang . String id = "id" ; serverPushActivationTracker . activate ( id ) ; serverPushActivationTracker . deactivate ( id ) ; "<AssertPlaceHolder>" ; } isActive ( ) { return this . equals ( editor . getActivePageInstance ( ) ) ; } | org . junit . Assert . assertFalse ( serverPushActivationTracker . isActive ( ) ) |
testDiaptchWithWsaDisable ( ) { javax . xml . namespace . QName port = new javax . xml . namespace . QName ( "http://apache.org/cxf/systest/ws/addr_feature/" , "AddNumbersPort" ) ; javax . xml . ws . Dispatch < javax . xml . soap . SOAPMessage > disptch = getService ( ) . createDispatch ( port , javax . xml . soap . SO... | org . junit . Assert . assertNotNull ( soapReqMsg ) |
loadRep_num_map_tasks_variable ( ) { when ( org . pentaho . big . data . kettle . plugins . mapreduce . JobEntryHadoopTransJobExecutorTest . rep . getJobEntryAttributeString ( org . pentaho . big . data . kettle . plugins . mapreduce . JobEntryHadoopTransJobExecutorTest . oid , "num_map_tasks" ) ) . thenReturn ( "${tes... | org . junit . Assert . assertEquals ( "${test}" , org . pentaho . big . data . kettle . plugins . mapreduce . JobEntryHadoopTransJobExecutorTest . exec . getNumMapTasks ( ) ) |
testLoadPredefinedRules ( ) { org . apache . tajo . rule . SelfDiagnosisRuleEngine ruleEngine = org . apache . tajo . rule . SelfDiagnosisRuleEngine . getInstance ( ) ; ruleEngine . loadPredefinedRules ( ) ; "<AssertPlaceHolder>" ; } getRules ( ) { return wrapperMap ; } | org . junit . Assert . assertThat ( ( ( ruleEngine . getRules ( ) . size ( ) ) > 0 ) , org . hamcrest . CoreMatchers . is ( true ) ) |
testUnLoadAllStrategies ( ) { strategyService . loadAllStrategies ( ) ; reset ( instrumentSubscriptionListener ) ; strategyService . unLoadAllStrategies ( ) ; "<AssertPlaceHolder>" ; for ( java . lang . String instrumentId : INSTRUMENT_IDS ) { verify ( instrumentSubscriptionListener , never ( ) ) . onInstrumentSubscrip... | org . junit . Assert . assertTrue ( strategyService . getStrategies ( ) . isEmpty ( ) ) |
testGenerateName_withOneLength ( ) { final java . lang . String result = nameGenerator . generateName ( 1 ) ; "<AssertPlaceHolder>" ; } generateName ( int ) { if ( length < 2 ) { length = 2 ; } final java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; final java . util . concurrent . ThreadLocalRando... | org . junit . Assert . assertEquals ( 2 , result . length ( ) ) |
emptyStringPropertyHasCorrectDefaultValue ( ) { java . lang . Object instance = org . jsonschema2pojo . integration . DefaultIT . classWithDefaults . newInstance ( ) ; java . lang . reflect . Method getter = org . jsonschema2pojo . integration . DefaultIT . classWithDefaults . getMethod ( "getEmptyStringWithDefault" ) ... | org . junit . Assert . assertThat ( ( ( java . lang . String ) ( getter . invoke ( instance ) ) ) , is ( equalTo ( "" ) ) ) |
testInsertRetrieveAllEmpty ( ) { org . mongojack . mock . MockObject object = new org . mongojack . mock . MockObject ( ) ; object . _id = "1" ; coll . insert ( object ) ; org . mongojack . mock . MockObject result = coll . findOne ( ) ; "<AssertPlaceHolder>" ; } findOne ( ) { return findOne ( new org . bson . Document... | org . junit . Assert . assertEquals ( object , result ) |
encodeContentGzippedZeroCopy ( ) { org . kaazing . mina . filter . codec . ProtocolCodecSessionEx session = new org . kaazing . mina . filter . codec . ProtocolCodecSessionEx ( ) ; org . kaazing . mina . core . buffer . IoBufferAllocatorEx < ? > allocator = session . getBufferAllocator ( ) ; org . apache . mina . filte... | org . junit . Assert . assertEquals ( expected , buf ) |
testBusThroughput ( ) { class TestCallback implements org . jboss . errai . bus . client . api . messaging . MessageCallback { int calls ; @ org . jboss . errai . bus . server . Override public void callback ( org . jboss . errai . bus . client . api . messaging . Message message ) { ( calls ) ++ ; } } TestCallback cal... | org . junit . Assert . assertEquals ( iterations , callback . calls ) |
testFloat2 ( ) { java . lang . Float positiveFloat = 345.4F ; java . lang . Float convertedFloat = _converter . convertType ( ExpandoColumnConstants . FLOAT , positiveFloat . toString ( ) ) ; "<AssertPlaceHolder>" ; } toString ( ) { com . liferay . petra . string . StringBundler sb = new com . liferay . petra . string ... | org . junit . Assert . assertEquals ( positiveFloat , convertedFloat ) |
testGetParametersWithDefaultEntityAndDisabledSecurity ( ) { unit . setSecurity ( false ) ; org . lnu . is . domain . paper . type . PaperType entity = new org . lnu . is . domain . paper . type . PaperType ( ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java . util . HashMap < jav... | org . junit . Assert . assertEquals ( expected , actual ) |
testGetDateStringByte_IncompleteMonthRoundUp ( ) { java . util . Date dateReceived = de . persosim . simulator . utils . Utils . getDate ( "1964XX29" , ( ( byte ) ( 1 ) ) ) ; java . util . Calendar calendar = java . util . Calendar . getInstance ( ) ; calendar . set ( Calendar . YEAR , 1964 ) ; calendar . set ( Calenda... | org . junit . Assert . assertEquals ( dateExpected , dateReceived ) |
testPrefixVerification ( java . lang . String , boolean ) { com . practicalunittesting . chp11 . refactoring . PhoneSearch ps = new com . practicalunittesting . chp11 . refactoring . PhoneSearch ( prefix ) ; "<AssertPlaceHolder>" ; } isValid ( ) { return valid ; } | org . junit . Assert . assertEquals ( expected , ps . isValid ( ) ) |
deleteTopicExpectSuccess ( ) { final net . jforum . entities . Topic topic = this . newTopic ( ) ; net . jforum . entities . Post post = new net . jforum . entities . Post ( ) ; post . setId ( 11 ) ; when ( repository . getLastPost ( topic . getForum ( ) ) ) . thenReturn ( post ) ; topic . getLastPost ( ) . getTopic ( ... | org . junit . Assert . assertEquals ( expected , topic . getForum ( ) . getLastPost ( ) ) |
testUnbalancedLeftBrace ( ) { try { x ( "" , "a+b(5,c(x,y)" ) ; org . junit . Assert . fail ( "Expected<sp>exception" ) ; } catch ( com . questdb . ex . ParserException e ) { "<AssertPlaceHolder>" ; } } getPosition ( ) { return com . questdb . parser . sql . QueryError . INSTANCE . tl . get ( ) . position ; } | org . junit . Assert . assertEquals ( 3 , com . questdb . parser . sql . QueryError . getPosition ( ) ) |
testOnErrorWhenFileAlreadyExists ( ) { final org . jboss . errai . bus . client . api . messaging . Message message = mock ( org . jboss . errai . bus . client . api . messaging . Message . class ) ; final java . lang . Throwable throwable = mock ( java . lang . Throwable . class ) ; doReturn ( "FileAlreadyExistsExcept... | org . junit . Assert . assertFalse ( error ) |
testRedisMasterRoleCorrect ( ) { result = new java . util . function . Supplier < java . lang . String > ( ) { @ com . ctrip . xpipe . redis . console . healthcheck . actions . redismaster . Override public java . lang . String get ( ) { return com . ctrip . xpipe . redis . console . healthcheck . actions . redismaster... | org . junit . Assert . assertTrue ( instance . getRedisInstanceInfo ( ) . isMaster ( ) ) |
testLastFieldOptionalTrueWhenSet ( ) { final java . util . List < com . cronutils . model . field . definition . FieldDefinition > fields = new java . util . ArrayList ( ) ; fields . add ( mockFieldDefinition1 ) ; fields . add ( mockFieldDefinition2 ) ; fields . add ( mockFieldDefinition3optional ) ; final java . util ... | org . junit . Assert . assertTrue ( sortedFieldDefinitions . get ( ( ( fields . size ( ) ) - 1 ) ) . isOptional ( ) ) |
testFindByRoleUserGroupAndObjectName ( ) { java . lang . String objectName1 = "alphaName1" ; java . lang . String roleUserGroup1 = "sigmaGroup1" ; java . lang . String objectName2 = "alphaName2" ; java . lang . String roleUserGroup2 = "sigmaGroup2" ; org . oscarehr . common . model . SecObjPrivilege secObjPrivilege1 = ... | org . junit . Assert . assertTrue ( true ) |
testToDMNModelLiteralExpressionsEmptyValue ( ) { for ( int uiRowIndex = 0 ; uiRowIndex < ( uiModel . getRowCount ( ) ) ; uiRowIndex ++ ) { for ( int uiColumnIndex = 1 ; uiColumnIndex < ( uiModel . getColumnCount ( ) ) ; uiColumnIndex ++ ) { mapper . toDMNModel ( uiRowIndex , uiColumnIndex , cellValueSupplier ) ; final ... | org . junit . Assert . assertEquals ( "" , le . getText ( ) . getValue ( ) ) |
testExecuteAction ( ) { org . pentaho . platform . plugin . action . openflashchart . OpenFlashChartComponent fcc = spy ( flashChartComponent ) ; doReturn ( resultSet ) . when ( fcc ) . getInputValue ( "chart-data" ) ; when ( resultSet . isScrollable ( ) ) . thenReturn ( false ) ; when ( resultSet . memoryCopy ( ) ) . ... | org . junit . Assert . assertTrue ( action ) |
getModelInGtx ( ) { org . slim3 . datastore . model . Hoge hoge = new org . slim3 . datastore . model . Hoge ( ) ; org . slim3 . datastore . Datastore . putWithoutTx ( hoge ) ; org . slim3 . datastore . GlobalTransaction gtx = org . slim3 . datastore . Datastore . beginGlobalTransaction ( ) ; org . slim3 . datastore . ... | org . junit . Assert . assertThat ( ref . getModel ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . notNullValue ( ) ) ) |
shouldNotBeInstalledUsingExternalContext ( ) { javax . faces . context . ExternalContext externalContext = mock ( javax . faces . context . ExternalContext . class ) ; "<AssertPlaceHolder>" ; } isInstalled ( javax . servlet . ServletContext ) { org . springframework . util . Assert . notNull ( servletContext , "Servlet... | org . junit . Assert . assertThat ( org . springframework . springfaces . SpringFacesIntegration . isInstalled ( externalContext ) , org . hamcrest . CoreMatchers . is ( false ) ) |
test2PCSendRollback ( ) { javax . jms . XAConnection conn = null ; javax . jms . Connection conn2 = null ; try { conn = xacf . createXAConnection ( ) ; tm . begin ( ) ; javax . jms . XASession sess = conn . createXASession ( ) ; javax . transaction . xa . XAResource res = sess . getXAResource ( ) ; javax . transaction ... | org . junit . Assert . assertNull ( m2 ) |
testRegionEquals ( ) { final com . amazonaws . regions . Region usWest2 = com . amazonaws . regions . RegionUtils . getRegion ( "us-west-2" ) ; final com . amazonaws . regions . Region other = com . amazonaws . regions . RegionUtils . getRegionByEndpoint ( "s3.us-west-2.amazonaws.com" ) ; "<AssertPlaceHolder>" ; } getR... | org . junit . Assert . assertEquals ( usWest2 , other ) |
testOneOne ( ) { java . lang . String numA = "1" ; java . lang . String numB = "1" ; java . lang . String res = "0" ; java . math . BigInteger aNumber = new java . math . BigInteger ( numA ) ; java . math . BigInteger bNumber = new java . math . BigInteger ( numB ) ; java . math . BigInteger result = aNumber . xor ( bN... | org . junit . Assert . assertTrue ( res . equals ( result . toString ( ) ) ) |
testBug47371long ( ) { "<AssertPlaceHolder>" ; } add ( java . lang . Object , java . lang . Object ) { if ( ( obj0 == null ) && ( obj1 == null ) ) { return java . lang . Long . valueOf ( 0 ) ; } final org . apache . el . lang . ELArithmetic delegate ; if ( org . apache . el . lang . ELArithmetic . BIGDECIMAL . matches ... | org . junit . Assert . assertEquals ( java . lang . Long . valueOf ( 1 ) , org . apache . el . lang . ELArithmetic . add ( "" , java . lang . Integer . valueOf ( 1 ) ) ) |
shouldReturnFalseForInvalidMatch ( ) { int every = 2 ; monthlyEvent = new org . mifos . accounts . savings . interest . schedule . internal . MonthlyOnLastDayOfMonthInterestScheduledEvent ( every ) ; boolean isMatch = monthlyEvent . isAMatchingDate ( jan1st , jan31st ) ; "<AssertPlaceHolder>" ; } isAMatchingDate ( org ... | org . junit . Assert . assertFalse ( isMatch ) |
testDoNotWriteDuringDecorateLogger ( ) { org . jenkinsci . plugins . envinject . FreeStyleProject project = jenkins . createFreeStyleProject ( ) ; org . jenkinsci . plugins . envinject . FreeStyleBuild build = new org . jenkinsci . plugins . envinject . FreeStyleBuild ( project ) ; org . jenkinsci . plugins . envinject... | org . junit . Assert . assertThat ( outputStream . toByteArray ( ) , org . hamcrest . Matchers . is ( new byte [ 0 ] ) ) |
testMethodAnnotationPlain ( ) { "<AssertPlaceHolder>" ; } monitoringLocationsExists ( ) { final java . sql . Connection connection = getDataSource ( ) . getConnection ( ) ; boolean exists = false ; try { connection . prepareStatement ( "SELECT<sp>id<sp>FROM<sp>monitoringlocations" ) . execute ( ) ; exists = true ; } ca... | org . junit . Assert . assertTrue ( monitoringLocationsExists ( ) ) |
testPlainTextSizeGreaterThanBlockSize ( ) { javax . security . auth . kerberos . KerberosKey key = new javax . security . auth . kerberos . KerberosKey ( new javax . security . auth . kerberos . KerberosPrincipal ( "hnelson@EXAMPLE.COM" ) , org . apache . directory . server . kerberos . shared . crypto . encryption . D... | org . junit . Assert . assertTrue ( beginsWith ( plainText , recoveredText ) ) |
testGetGroupsToUpper ( ) { org . apache . hadoop . security . RuleBasedLdapGroupsMapping groupsMapping = org . mockito . Mockito . spy ( new org . apache . hadoop . security . RuleBasedLdapGroupsMapping ( ) ) ; java . util . List < java . lang . String > groups = new java . util . ArrayList ( ) ; groups . add ( "group1... | org . junit . Assert . assertEquals ( groupsUpper , groupsMapping . getGroups ( "admin" ) ) |
getTotalNumberOfPetsUsingStreams ( ) { int numberOfPetsStream = this . people . stream ( ) . mapToInt ( com . gs . collections . impl . PersonAndPetKataTest . Person :: getNumberOfPets ) . sum ( ) ; "<AssertPlaceHolder>" ; } sum ( ) { org . junit . Assert . assertEquals ( 10L , com . gs . collections . impl . list . pr... | org . junit . Assert . assertEquals ( 9 , numberOfPetsStream ) |
non_interface_iterable_type_returns_no_specimen ( ) { java . lang . Object result = this . iterableBuilder . create ( java . util . Stack . class , null ) ; "<AssertPlaceHolder>" ; } create ( java . lang . Object , com . flextrade . jfixture . SpecimenContext ) { if ( ! ( request instanceof com . flextrade . jfixture .... | org . junit . Assert . assertEquals ( new com . flextrade . jfixture . NoSpecimen ( ) , result ) |
testTimeOutWithHostNull ( ) { org . apache . ambari . server . actionmanager . Stage s = getStageWithServerAction ( 1 , 977 , null , "test" , 2 , false , false ) ; s . setHostRoleStatus ( null , Role . AMBARI_SERVER_ACTION . toString ( ) , HostRoleStatus . IN_PROGRESS ) ; org . apache . ambari . server . actionmanager ... | org . junit . Assert . assertEquals ( false , scheduler . timeOutActionNeeded ( HostRoleStatus . IN_PROGRESS , s , null , Role . AMBARI_SERVER_ACTION . toString ( ) , ( - 1L ) , 1L ) ) |
testHasEffect ( ) { "<AssertPlaceHolder>" ; } hasEffect ( ) { return ( rational . getNumerator ( ) ) != ( rational . getDenominator ( ) ) ; } | org . junit . Assert . assertTrue ( instance . hasEffect ( ) ) |
longstream_generate ( ) { java . util . OptionalLong one = java . util . stream . LongStream . generate ( ( ) -> 1 ) . limit ( 10 ) . distinct ( ) . findFirst ( ) ; "<AssertPlaceHolder>" ; } getAsLong ( ) { return 10 ; } | org . junit . Assert . assertEquals ( 1 , one . getAsLong ( ) , 0 ) |
testNewPacket ( ) { try { org . pcap4j . packet . IcmpV6RouterSolicitationPacket p = org . pcap4j . packet . IcmpV6RouterSolicitationPacket . newPacket ( packet . getRawData ( ) , 0 , packet . getRawData ( ) . length ) ; "<AssertPlaceHolder>" ; } catch ( org . pcap4j . packet . IllegalRawDataException e ) { throw new j... | org . junit . Assert . assertEquals ( packet , p ) |
defaultValue ( ) { factory = new com . alibaba . citrus . springext . support . context . XmlApplicationContext ( new org . springframework . core . io . FileSystemResource ( new java . io . File ( srcdir , "property-placeholder.xml" ) ) ) ; conf = ( ( com . alibaba . citrus . service . configuration . Configuration ) ... | org . junit . Assert . assertEquals ( false , conf . isProductionMode ( ) ) |
testAddToAll ( ) { float [ ] da = new float [ ] { 1 , 2 , 0 , - 1 , - 3 } ; float [ ] expected = new float [ ] { 2 , 3 , 1 , 0 , - 2 } ; zemberek . core . math . FloatArrays . addToAll ( da , 1 ) ; "<AssertPlaceHolder>" ; } addToAll ( float [ ] , float ) { zemberek . core . math . FloatArrays . validateArray ( data ) ;... | org . junit . Assert . assertTrue ( java . util . Arrays . equals ( expected , da ) ) |
testContainsMappeableRunContainer_ExcludeShiftedSet ( ) { org . roaringbitmap . buffer . MappeableContainer rc = new org . roaringbitmap . buffer . MappeableRunContainer ( ) . add ( 0 , 10 ) ; org . roaringbitmap . buffer . MappeableContainer subset = new org . roaringbitmap . buffer . MappeableRunContainer ( ) . add (... | org . junit . Assert . assertFalse ( rc . contains ( subset ) ) |
testQueryGatewayCorrectlyReturnsOnSubscriptionQuery ( ) { org . axonframework . queryhandling . QueryGateway queryGateway = org . axonframework . queryhandling . DefaultQueryGateway . builder ( ) . queryBus ( queryBus ) . build ( ) ; java . lang . String result = queryGateway . subscriptionQuery ( new org . axonframewo... | org . junit . Assert . assertEquals ( org . axonframework . queryhandling . SubscriptionQueryTest . FOUND , result ) |
testRunSerializationDeserialization ( ) { final int [ ] data = org . roaringbitmap . TestSerialization . takeSortedAndDistinct ( new java . util . Random ( 4060 ) , 100000 ) ; org . roaringbitmap . RoaringBitmap bitmap_a = org . roaringbitmap . RoaringBitmap . bitmapOf ( data ) ; org . roaringbitmap . RoaringBitmap bit... | org . junit . Assert . assertEquals ( bitmap_a , bitmap_c ) |
canCommitTestWithUnknownException ( ) { doThrow ( new java . lang . UnsupportedOperationException ( "testException" ) ) . when ( org . opendaylight . mdsal . dom . store . inmemory . InMemoryDOMStoreThreePhaseCommitCohortTest . IN_MEMORY_DOM_DATA_STORE ) . validate ( any ( ) ) ; try { org . opendaylight . mdsal . dom .... | org . junit . Assert . assertTrue ( ( ( e . getCause ( ) ) instanceof java . lang . UnsupportedOperationException ) ) |
testArrays ( ) { ff4j . setAuthorizationsManager ( new org . ff4j . security . AuthorizationsManager ( ) { public java . lang . String toJson ( ) { return "dummy" ; } public java . util . Set < java . lang . String > listAllPermissions ( ) { return new java . util . HashSet ( ) ; } public java . util . Set < java . lan... | org . junit . Assert . assertEquals ( events . size ( ) , ee . length ) |
testEqualBytesWithSecondStoreBeingLonger ( ) { net . openhft . chronicle . bytes . BytesStore store1 = alloc1 . elasticBytes ( 64 ) . append ( "TW-TRSY-20181217-NY572677_3256N1" ) ; net . openhft . chronicle . bytes . BytesStore store2 = alloc1 . elasticBytes ( 64 ) . append ( "TW-TRSY-20181217-NY572677_3256N15" ) ; "<... | org . junit . Assert . assertThat ( store1 . equalBytes ( store2 , store2 . length ( ) ) , org . hamcrest . CoreMatchers . is ( false ) ) |
limit1Test ( ) { when ( transformerConfig . getProperty ( "property.name" ) ) . thenReturn ( "3" ) ; log . debug ( "one" ) ; log . debug ( "two" ) ; log . debug ( "three" ) ; "<AssertPlaceHolder>" ; } getEntries ( org . alfresco . service . cmr . repository . NodeRef ) { return org . alfresco . repo . download . Downlo... | org . junit . Assert . assertArrayEquals ( new java . lang . String [ ] { "three" } , log . getEntries ( 1 ) ) |
testGetConfigurationSetting_ForNonNullContext ( ) { final org . oscm . domobjects . ConfigurationSetting initSetting = new org . oscm . domobjects . ConfigurationSetting ( org . oscm . internal . types . enumtypes . ConfigurationKey . BASE_URL , "context2" , "anotherValue" ) ; runTX ( new java . util . concurrent . Cal... | org . junit . Assert . assertNotNull ( setting ) |
testNegativeInteger ( ) { com . mictale . jsonite . JsonNumber n = com . mictale . jsonite . JsonNumber . of ( ( - 345543 ) ) . asNumber ( ) ; "<AssertPlaceHolder>" ; } intValue ( ) { return intValue ; } | org . junit . Assert . assertEquals ( ( - 345543 ) , n . intValue ( ) ) |
testAvailablePoolsDoesNotIncludeUeberPool ( ) { org . candlepin . model . Owner owner = this . createOwner ( ) ; org . candlepin . model . Product product = this . createProduct ( owner ) ; org . candlepin . model . Consumer consumer = this . createMockConsumer ( owner , false ) ; consumer . setFact ( "cpu_cores" , "4"... | org . junit . Assert . assertEquals ( 1 , results . size ( ) ) |
test02 ( ) { com . itextpdf . kernel . pdf . PdfDocument pdfDocument = new com . itextpdf . kernel . pdf . PdfDocument ( new com . itextpdf . kernel . pdf . PdfReader ( ( ( com . itextpdf . kernel . pdf . canvas . parser . SimpleFontToUnicodeExtractionTest . sourceFolder ) + "simpleFontToUnicode02.pdf" ) ) ) ; java . l... | org . junit . Assert . assertEquals ( expected , actualText ) |
shouldReturnPropertyValueAsBlankStringGivenAnnotationAttributesDoesNotContainProperty ( ) { java . util . Map < java . lang . String , java . lang . Object > attributes = new java . util . HashMap ( ) ; org . flips . model . FlipAnnotationAttributes annotationAttributes = new org . flips . model . FlipAnnotationAttribu... | org . junit . Assert . assertEquals ( "" , propertyValue ) |
shouldFailFindOrCreateNodeSessionPathTypeNullPath ( ) { try { tools . findOrCreateNode ( session , NULL_STRING , org . modeshape . jcr . JcrToolsTest . DEF_TYPE ) ; } catch ( java . lang . Exception e ) { "<AssertPlaceHolder>" ; } } findOrCreateNode ( javax . jcr . Session , java . lang . String , java . lang . String ... | org . junit . Assert . assertTrue ( ( e instanceof java . lang . IllegalArgumentException ) ) |
testSerialization ( ) { org . jfree . chart . renderer . category . DefaultCategoryItemRenderer r1 = new org . jfree . chart . renderer . category . DefaultCategoryItemRenderer ( ) ; org . jfree . chart . renderer . category . DefaultCategoryItemRenderer r2 = ( ( org . jfree . chart . renderer . category . DefaultCateg... | org . junit . Assert . assertEquals ( r1 , r2 ) |
testFindSetterWithMethodOfSameName ( ) { org . supercsv . util . ReflectionUtils . findSetter ( bean , "primitiveBoolean" , boolean . class ) . invoke ( bean , true ) ; "<AssertPlaceHolder>" ; } isPrimitiveBoolean ( ) { return primitiveBoolean ; } | org . junit . Assert . assertTrue ( bean . isPrimitiveBoolean ( ) ) |
doNotCreateCenterWhenSouthIsMissing ( ) { org . openscience . cdk . interfaces . IAtom focus = org . openscience . cdk . stereo . FischerRecognitionTest . atom ( "C" , 0 , 0.8 , 0.42 ) ; org . openscience . cdk . interfaces . IAtom north = org . openscience . cdk . stereo . FischerRecognitionTest . atom ( "C" , 0 , 0.8... | org . junit . Assert . assertNull ( element ) |
lockWhenOtherIsNotTimeout ( ) { com . google . appengine . api . datastore . Key globalTransactionKey = org . slim3 . datastore . DatastoreUtil . allocateId ( ds , GlobalTransaction . KIND ) ; com . google . appengine . api . datastore . Key globalTransactionKey2 = org . slim3 . datastore . DatastoreUtil . allocateId (... | org . junit . Assert . assertThat ( ds . getActiveTransactions ( ) . size ( ) , org . hamcrest . CoreMatchers . is ( 0 ) ) |
testBase64Encode ( ) { try { java . lang . String encodeStr = com . qcloud . cos . common_utils . CommonCodecUtils . Base64Encode ( com . qcloud . cos . common_utils . CommonCodecUtilsTest . plainText . getBytes ( "UTF-8" ) ) ; java . lang . String expectEncodeStr = "NjgxODA1ZDlmN2M2YWI5ODhhMDBjMDJmMTA5NmIxYjY4YTc3YWFl... | org . junit . Assert . assertTrue ( cmpResult ) |
basicExample ( ) { uk . co . rockstable . experiements . codegen . reflection . extractors . ExtractorFactory factory = uk . co . rockstable . experiements . codegen . reflection . extractors . ExtractorFactory . newInstance ( ExtractorFactory . Type . MAGIC ) ; uk . co . rockstable . experiements . codegen . reflectio... | org . junit . Assert . assertEquals ( "hello<sp>world" , extractedString ) |
testBuild ( ) { org . lnu . is . domain . duty . type . DutyType context = new org . lnu . is . domain . duty . type . DutyType ( ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>DutyType<sp>e<sp>WHERE<sp>e.status=:status<sp>AND<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>" ; org . lnu . is . pagination... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
buildingFromVariableLengthByteArrayIndexedListTestIntUnsafe ( ) { final java . util . List < com . yandex . yoctodb . util . UnsignedByteArray > elements = new java . util . ArrayList ( ) ; elements . add ( com . yandex . yoctodb . util . UnsignedByteArrays . from ( 0 ) ) ; elements . add ( com . yandex . yoctodb . uti... | org . junit . Assert . assertEquals ( puttedValue , list . getIntUnsafe ( i ) ) |
testHasRelationshipsWithOutgoingDirectionWithMultipleRelationshipTypes ( ) { boolean hasRelationship = neo . hasRelationship ( org . neo4j . rest . graphdb . OUTGOING , RelTypes . KNOWS , RelTypes . FIGHTS ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( hasRelationship ) |
testNonTokenQop ( ) { java . lang . String header = "Digest<sp>qop=au{th" ; java . io . StringReader input = new java . io . StringReader ( header ) ; java . util . Map < java . lang . String , java . lang . String > result = org . apache . tomcat . util . http . parser . HttpParser . parseAuthorizationDigest ( input )... | org . junit . Assert . assertNull ( result ) |
testSixtyFourByteStreamWithGoodFileTypeAndCloseHeader ( ) { java . io . InputStream dbf = new java . io . ByteArrayInputStream ( new byte [ ] { 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , ... | org . junit . Assert . assertNull ( reader . read ( ) ) |
testFilter ( ) { org . meridor . perspective . beans . Instance firstInstance = org . meridor . perspective . backend . EntityGenerator . getInstance ( ) ; java . util . List < org . meridor . perspective . beans . Instance > instances = new java . util . ArrayList < org . meridor . perspective . beans . Instance > ( )... | org . junit . Assert . assertThat ( filteredInstances , org . hamcrest . Matchers . contains ( firstInstance ) ) |
willReturnOnePageIfthereWasNoPaging ( ) { kong . unirest . PagedList < BehaviorTests . RequestCapture > result = kong . unirest . Unirest . get ( MockServer . PAGED ) . asPaged ( ( r ) -> r . asObject ( . class ) , ( r ) -> null ) ; "<AssertPlaceHolder>" ; } size ( ) { return headers . stream ( ) . map ( Header :: getN... | org . junit . Assert . assertEquals ( 1 , result . size ( ) ) |
rememberWindowSizeUsesCorrectPropertiesKey ( ) { java . util . Properties properties = new java . util . Properties ( ) ; properties . put ( "rememberWindowSize" , "true" ) ; com . github . marabou . properties . UserProperties userProperties = userProperties ( properties ) ; boolean result = userProperties . rememberW... | org . junit . Assert . assertTrue ( result ) |
testDeadEvent ( ) { com . voxelplugineering . voxelsniper . service . eventbus . EventBus bus = new com . voxelplugineering . voxelsniper . service . eventbus . AsyncEventBus ( com . voxelplugineering . voxelsniper . util . ContextTestUtil . create ( new com . voxelplugineering . voxelsniper . service . config . Config... | org . junit . Assert . assertEquals ( true , handler . dead ) |
getAllRoles_shouldReturnAllRolesInTheSystem ( ) { executeDataSet ( org . openmrs . api . UserServiceTest . XML_FILENAME ) ; java . util . List < org . openmrs . Role > roles = userService . getAllRoles ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return getMemberships ( ) . stream ( ) . filter ( ( m ) -> ! ( m . getVoide... | org . junit . Assert . assertEquals ( 7 , roles . size ( ) ) |
lifecycleStopStopsClientOnlyOnce ( ) { org . appenders . log4j2 . elasticsearch . jest . JestHttpObjectFactory objectFactory = spy ( org . appenders . log4j2 . elasticsearch . jest . JestHttpObjectFactoryTest . createTestObjectFactoryBuilder ( ) . build ( ) ) ; io . searchbox . client . JestClient client = mock ( io . ... | org . junit . Assert . assertEquals ( ( expectedInteractions + 1 ) , mockingDetails ( client ) . getInvocations ( ) . size ( ) ) |
invoke_mutateWithImmediateExpiry ( ) { cache . invoke ( org . cache2k . test . core . BasicCacheOperationsWithoutCustomizationsTest . KEY , new org . cache2k . processor . EntryProcessor < java . lang . Integer , java . lang . Integer , java . lang . Object > ( ) { @ org . cache2k . test . core . Override public org . ... | org . junit . Assert . assertFalse ( cache . containsKey ( org . cache2k . test . core . BasicCacheOperationsWithoutCustomizationsTest . KEY ) ) |
testContainerStateShouldBeRemovedAfterFailure ( ) { com . vmware . photon . controller . model . resources . ResourcePoolService . ResourcePoolState resourcePool = createResourcePool ( ) ; com . vmware . admiral . compute . container . ContainerDescriptionService . ContainerDescription containerDescription = createCont... | org . junit . Assert . assertNull ( containerState ) |
testSwitch3 ( ) { instrument ( org . jacoco . core . test . validation . java5 . CyclomaticComplexityTest . Switch . class ) ; target . test ( 0 ) ; target . test ( 1 ) ; final org . jacoco . core . analysis . ICounter complexity = analyze ( ) ; "<AssertPlaceHolder>" ; } getInstance ( int , int ) { if ( ( missed <= ( o... | org . junit . Assert . assertEquals ( org . jacoco . core . internal . analysis . CounterImpl . getInstance ( 1 , 2 ) , complexity ) |
testSetActionStatus ( ) { final org . bonitasoft . engine . queriablelogger . model . builder . SQueriableLogBuilder builder = fact . createNewInstance ( ) ; builder . actionStatus ( 1 ) . severity ( SQueriableLogSeverity . BUSINESS ) ; builder . actionType ( "variable_update" ) . actionScope ( "myVar" ) . rawMessage (... | org . junit . Assert . assertEquals ( 1 , queriableLog . getActionStatus ( ) ) |
usesOrganizationLevelPreset ( ) { org . opencastproject . security . api . Organization organization = org . easymock . EasyMock . createMock ( org . opencastproject . security . api . Organization . class ) ; org . easymock . EasyMock . replay ( organization ) ; java . lang . String seriesID = "series-ID" ; presetProv... | org . junit . Assert . assertEquals ( org . opencastproject . workflow . handler . workflow . DefaultsWorkflowOperationHandlerTest . ORGANIZATION_PRESET_VALUE , result . getProperties ( ) . get ( org . opencastproject . workflow . handler . workflow . DefaultsWorkflowOperationHandlerTest . OPT_KEY ) ) |
testPUSHN_2 ( ) { org . ethereum . vm . VM vm = new org . ethereum . vm . VM ( ) ; program = new org . ethereum . vm . Program ( org . spongycastle . util . encoders . Hex . decode ( "7fAABB" ) , invoke ) ; try { program . fullTrace ( ) ; vm . step ( program ) ; } finally { "<AssertPlaceHolder>" ; } } isStopped ( ) { r... | org . junit . Assert . assertTrue ( program . isStopped ( ) ) |
isPaymentVisible_SubscriptionManager ( ) { java . util . List < org . oscm . internal . vo . VOPaymentInfo > paymentInfoTypeList = new java . util . ArrayList ( ) ; paymentInfoTypeList . add ( new org . oscm . internal . vo . VOPaymentInfo ( ) ) ; when ( java . lang . Boolean . valueOf ( userBean . isLoggedInAndAdmin (... | org . junit . Assert . assertTrue ( result ) |
beanBound_setValidFieldValue_propertyValueChanged ( ) { binder . setBean ( item ) ; binder . bind ( nameField , "firstname" ) ; nameField . setValue ( "Henri" ) ; "<AssertPlaceHolder>" ; } getFirstname ( ) { return firstname ; } | org . junit . Assert . assertEquals ( "Henri" , item . getFirstname ( ) ) |
route ( ) { java . lang . String [ ] databases = new java . lang . String [ ] { "new://Resource?provider=org.router:DeterminedRouter&type=" 1 , "new://Resource?provider=org.router:DeterminedRouter&type=" 3 , "database3" } ; java . util . Properties properties = new java . util . Properties ( ) ; properties . setPropert... | org . junit . Assert . assertEquals ( 6 , rs . getInt ( 1 ) ) |
runCmdGetStringTet ( ) { process = org . mockito . Mockito . mock ( com . att . aro . core . commandline . impl . Process . class ) ; java . lang . String aMessage = "hello" ; java . io . InputStream stream = new java . io . ByteArrayInputStream ( aMessage . getBytes ( ) ) ; org . mockito . Mockito . when ( process . g... | org . junit . Assert . assertEquals ( aMessage , res ) |
testCommandLine ( ) { int ret = runStreamJob ( ) ; "<AssertPlaceHolder>" ; checkOutput ( ) ; } runStreamJob ( ) { boolean mayExit = false ; int returnStatus = 0 ; org . apache . hadoop . streaming . StreamJob job = new org . apache . hadoop . streaming . StreamJob ( args , mayExit ) ; returnStatus = job . go ( ) ; org ... | org . junit . Assert . assertEquals ( 0 , ret ) |
testFlowWithNoRefStep ( ) { java . net . URI resource = getClass ( ) . getResource ( "/corrupted/step_with_no_ref_flow.sl" ) . toURI ( ) ; io . cloudslang . lang . compiler . modeller . result . ExecutableModellingResult result = compiler . preCompileSource ( io . cloudslang . lang . compiler . SlangSource . fromFile (... | org . junit . Assert . assertTrue ( ( ( result . getErrors ( ) . size ( ) ) > 0 ) ) |
testReturn ( ) { fr . inria . corese . core . Graph g = fr . inria . corese . core . Graph . create ( ) ; fr . inria . corese . core . query . QueryProcess exec = fr . inria . corese . core . query . QueryProcess . create ( g ) ; java . lang . String q = "select<sp>(us:fun(5)<sp>as<sp>?n)<sp>where<sp>{}" + ( ( ( ( ( "f... | org . junit . Assert . assertEquals ( dt . intValue ( ) , 5 ) |
unescapeJSON_n ( ) { java . lang . String input = "\\n" ; java . lang . String unescaped = org . oscm . json . EscapeUtils . unescapeJSON ( input ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( "\n" , unescaped ) |
setMaxHeight ( ) { com . vaadin . flow . component . HasSizeTest . HasSizeComponent c = new com . vaadin . flow . component . HasSizeTest . HasSizeComponent ( ) ; c . setMaxHeight ( "100px" ) ; "<AssertPlaceHolder>" ; } getMaxHeight ( ) { return getElement ( ) . getStyle ( ) . get ( ElementConstants . STYLE_MAX_HEIGHT ... | org . junit . Assert . assertEquals ( "100px" , c . getMaxHeight ( ) ) |
testIdClass ( ) { final cz . habarta . typescript . generator . Settings settings = cz . habarta . typescript . generator . TestUtils . settings ( ) ; final java . lang . String output = new cz . habarta . typescript . generator . TypeScriptGenerator ( settings ) . generateTypeScript ( cz . habarta . typescript . gener... | org . junit . Assert . assertEquals ( expected , output ) |
isRenewalNecessaryReturnsFalseDeviceKeyPresent ( ) { new tests . unit . com . microsoft . azure . sdk . iot . device . auth . StrictExpectations ( ) { { tests . unit . com . microsoft . azure . sdk . iot . device . auth . Deencapsulation . newInstance ( tests . unit . com . microsoft . azure . sdk . iot . device . auth... | org . junit . Assert . assertFalse ( needsToRenew ) |
convertToFloatNull ( ) { java . lang . Boolean t = null ; java . lang . Float f = converter . toFloat ( t ) ; "<AssertPlaceHolder>" ; } toFloat ( java . lang . Long ) { if ( value == null ) { return null ; } return value . floatValue ( ) ; } | org . junit . Assert . assertNull ( f ) |
shouldGetHoursPerDay ( ) { net . rrm . ehour . data . DateRange dateRange = new net . rrm . ehour . data . DateRange ( new java . util . Date ( ( 2006 - 1900 ) , ( 5 - 1 ) , 1 ) , new java . util . Date ( ( 2008 - 1900 ) , 1 , 3 ) ) ; java . util . List < net . rrm . ehour . report . reports . element . FlatReportEleme... | org . junit . Assert . assertEquals ( 12 , results . size ( ) ) |
testMarshalArchetypes ( ) { io . fabric8 . tooling . archetype . catalog . Archetypes archetypes = new io . fabric8 . tooling . archetype . catalog . Archetypes ( ) ; archetypes . add ( new io . fabric8 . tooling . archetype . catalog . Archetype ( "foo" , "bar" , "1.1" , "Found<sp>" 2 , "Some<sp>description" ) ) ; arc... | org . junit . Assert . assertEquals ( 2 , ( ( io . fabric8 . tooling . archetype . catalog . Archetypes ) ( result ) ) . getArchetypes ( ) . size ( ) ) |
testRemoteExists ( ) { doReturn ( java . util . Collections . singletonList ( mockResource ) ) . when ( mockSardine ) . list ( entry . getLocation ( ) ) ; "<AssertPlaceHolder>" ; } remoteExists ( com . github . sardine . Sardine ) { try { sardine . list ( getLocation ( ) ) ; return true ; } catch ( java . io . IOExcept... | org . junit . Assert . assertThat ( entry . remoteExists ( mockSardine ) , org . hamcrest . Matchers . is ( true ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.