input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testOperator_lessEqualsThanNullNumber ( ) { java . lang . Number x = null ; java . lang . Number y = 123 ; boolean resutl = org . eclipse . smarthome . model . script . lib . NumberExtensions . operator_lessEqualsThan ( x , y ) ; "<AssertPlaceHolder>" ; } operator_lessEqualsThan ( java . lang . Number , java . lang . N... | org . junit . Assert . assertTrue ( resutl ) |
testRouting ( ) { exc = new com . predic8 . membrane . core . exchange . Exchange ( null ) ; com . predic8 . membrane . core . http . Request res = new com . predic8 . membrane . core . http . Request ( ) ; res . setBodyContent ( getByteArrayData ( getClass ( ) . getResourceAsStream ( "/customerFromBonn.xml" ) ) ) ; ex... | org . junit . Assert . assertEquals ( "http://www.host.de/service" , exc . getDestinations ( ) . get ( 0 ) ) |
close ( ) { final org . opendaylight . openflowplugin . api . openflow . device . DeviceContext deviceContext = mock ( org . opendaylight . openflowplugin . api . openflow . device . DeviceContext . class ) ; final java . util . concurrent . ConcurrentHashMap < org . opendaylight . openflowplugin . api . openflow . dev... | org . junit . Assert . assertEquals ( 1 , deviceContexts . size ( ) ) |
testSession ( ) { org . gitlab4j . api . models . Session session = org . gitlab4j . api . JsonUtils . unmarshalResource ( org . gitlab4j . api . models . Session . class , "session.json" ) ; "<AssertPlaceHolder>" ; } compareJson ( T , java . lang . String ) { java . io . InputStreamReader reader = new java . io . Inpu... | org . junit . Assert . assertTrue ( org . gitlab4j . api . JsonUtils . compareJson ( session , "session.json" ) ) |
testOptionalListWithinGroup ( ) { java . util . List < org . apache . parquet . schema . Type > fields = new java . util . ArrayList < org . apache . parquet . schema . Type > ( ) ; fields . add ( new org . apache . parquet . schema . GroupType ( OPTIONAL , "element" , org . apache . parquet . schema . OriginalType . O... | org . junit . Assert . assertEquals ( expected , actual ) |
removeNext ( ) { final int count = 1000 ; final java . util . List < com . taobao . gecko . core . nio . impl . TimerRef > list = new java . util . ArrayList < com . taobao . gecko . core . nio . impl . TimerRef > ( ) ; for ( int i = 0 ; i < count ; i ++ ) { final com . taobao . gecko . core . nio . impl . TimerRef tim... | org . junit . Assert . assertEquals ( 0 , this . queue . size ( ) ) |
pointsAreMergedCorrectly ( ) { org . libreplan . business . calendars . entities . AvailabilityTimeLine timeLine = org . libreplan . business . calendars . entities . AvailabilityTimeLine . allValid ( ) ; timeLine . invalidAt ( new org . joda . time . LocalDate ( 2010 , 4 , 7 ) ) ; timeLine . invalidAt ( new org . joda... | org . junit . Assert . assertFalse ( timeLine . isValid ( new org . joda . time . LocalDate ( 2010 , 4 , 8 ) ) ) |
generateOccurrencesInMonthWithNoEvents ( ) { java . util . List < com . stratelia . webactiv . almanach . model . EventDetail > events = new java . util . ArrayList < com . stratelia . webactiv . almanach . model . EventDetail > ( ) ; java . util . List < com . stratelia . webactiv . almanach . model . EventOccurrence ... | org . junit . Assert . assertThat ( occurrences . isEmpty ( ) , is ( true ) ) |
createGetterSetterByField ( ) { java . lang . reflect . Field f1 = org . apache . servicecomb . foundation . common . utils . TestLambdaMetafactoryUtils . Model . class . getDeclaredField ( "f1" ) ; org . apache . servicecomb . foundation . common . utils . bean . Getter < org . apache . servicecomb . foundation . comm... | org . junit . Assert . assertEquals ( 1 , ( ( int ) ( getter . get ( model ) ) ) ) |
getMissingItemReturnsNull ( ) { for ( org . springframework . context . ApplicationContext context : AppContextSetup . contextList ) { org . apache . taverna . reference . ReferenceSetDao dao = ( ( org . apache . taverna . reference . ReferenceSetDao ) ( context . getBean ( "testDao" ) ) ) ; org . apache . taverna . re... | org . junit . Assert . assertNull ( dao . get ( id ) ) |
shouldGetDbFromURIWithoutCredentials ( ) { java . net . URI uri = new java . net . URI ( "redis://host:9000/4" ) ; "<AssertPlaceHolder>" ; } getDBIndex ( java . net . URI ) { java . lang . String [ ] pathSplit = uri . getPath ( ) . split ( "/" , 2 ) ; if ( ( pathSplit . length ) > 1 ) { java . lang . String dbIndexStr ... | org . junit . Assert . assertEquals ( 4 , redis . clients . util . JedisURIHelper . getDBIndex ( uri ) ) |
testDictRef_String_String ( ) { org . openscience . cdk . dict . DictRef dictRef = new org . openscience . cdk . dict . DictRef ( "bar:foo" , "bla" ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( dictRef ) |
testGetFeatureServiceByPriorityBetweenAttributeAndRequestAttribute ( ) { when ( request . getAttribute ( eq ( JspFlipTag . FEATURE_SERVICE_ATTRIBUTE ) ) ) . thenReturn ( featureService ) ; final com . tacitknowledge . flip . FeatureService paramService = mock ( com . tacitknowledge . flip . FeatureService . class ) ; t... | org . junit . Assert . assertEquals ( paramService , tag . getFeatureService ( ) ) |
testConstructor ( ) { org . openhealthtools . mdht . uml . cda . ihe . operations . CoverageEntryOperations obj = new org . openhealthtools . mdht . uml . cda . ihe . operations . CoverageEntryOperations ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( true ) |
copyPreparationShouldForwardExceptions ( ) { final com . jayway . restassured . response . Response response = given ( ) . queryParam ( "destination" , "/destination" ) . when ( ) . expect ( ) . statusCode ( 404 ) . log ( ) . ifError ( ) . post ( "api/preparations/{id}/copy" , "preparation_not_found" ) ; "<AssertPlaceH... | org . junit . Assert . assertEquals ( 404 , response . getStatusCode ( ) ) |
shouldNotifyOnCreateSymLink ( ) { diskCacheV111 . util . PnfsId parent = new diskCacheV111 . util . PnfsId ( "000000000000000000000000000000000001" ) ; diskCacheV111 . util . PnfsId newSymLink = new diskCacheV111 . util . PnfsId ( "000000000000000000000000000000000002" ) ; given ( inner . find ( any ( ) , eq ( newSymLi... | org . junit . Assert . assertThat ( result , is ( equalTo ( newSymLink ) ) ) |
testConstructor2 ( ) { org . kefirsf . bb . conf . NamedValue namedValue = new org . kefirsf . bb . conf . NamedValue ( org . kefirsf . bb . conf . NamedValueTest . NAME ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; } | org . junit . Assert . assertEquals ( org . kefirsf . bb . conf . NamedValueTest . NAME , namedValue . getName ( ) ) |
testGetZoneInUserNameJustUserName ( ) { java . lang . String testUser = "justauser" ; java . lang . String actual = org . irods . jargon . core . utils . MiscIRODSUtils . getZoneInUserName ( testUser ) ; "<AssertPlaceHolder>" ; } getZoneInUserName ( java . lang . String ) { if ( ( userName == null ) || ( userName . isE... | org . junit . Assert . assertEquals ( "" , actual ) |
testSaveWithValidation ( ) { final org . apache . commons . configuration2 . resolver . CatalogResolver resolver = new org . apache . commons . configuration2 . resolver . CatalogResolver ( ) ; resolver . setCatalogFiles ( org . apache . commons . configuration2 . TestXMLConfiguration . CATALOG_FILES ) ; conf = new org... | org . junit . Assert . assertEquals ( "123456789" , conf . getString ( "Employee.SSN" ) ) |
getAccount_sameAs ( ) { com . google . auth . oauth2 . ComputeEngineCredentialsTest . MockMetadataServerTransportFactory transportFactory = new com . google . auth . oauth2 . ComputeEngineCredentialsTest . MockMetadataServerTransportFactory ( ) ; java . lang . String defaultAccountEmail = "mail@mail.com" ; transportFac... | org . junit . Assert . assertEquals ( defaultAccountEmail , credentials . getAccount ( ) ) |
countChildrenTest ( ) { java . lang . Long countChildren = org . kie . workbench . common . stunner . core . graph . util . GraphUtils . countChildren ( graphInstance . parentNode ) ; "<AssertPlaceHolder>" ; } countChildren ( org . kie . workbench . common . stunner . core . graph . Node ) { return element . getOutEdge... | org . junit . Assert . assertEquals ( java . lang . Long . valueOf ( 4 ) , countChildren ) |
emptyTemplateRendersAsEmptyString ( ) { "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { return new com . tddinaction . template . TemplateParse ( ) . parse ( template ) ; } | org . junit . Assert . assertTrue ( parse ( "" ) . isEmpty ( ) ) |
testGetPublicKey ( ) { final java . io . File file1 = folder . newFile ( "somekey.pub" ) ; java . lang . String key = "ssh-rsa<sp>AAAAB3NzaC1yc2E<sp>foo@bar" ; java . io . PrintWriter writer = new java . io . PrintWriter ( file1 , "UTF-8" ) ; writer . print ( key ) ; writer . close ( ) ; org . gitlab . runner . GitlabC... | org . junit . Assert . assertEquals ( key , org . gitlab . runner . GitlabConfigImplTest . subject . getPublicKey ( ) ) |
findByConsumerAndIdDoesntExist ( ) { org . candlepin . model . Consumer consumer = new org . candlepin . model . Consumer ( "testConsumer" , "testUser" , owner , ct ) ; consumer . addGuestId ( new org . candlepin . model . GuestId ( "1" ) ) ; consumerCurator . create ( consumer ) ; org . candlepin . model . GuestId res... | org . junit . Assert . assertNull ( result ) |
testFieldString1 ( ) { com . ctrip . framework . cs . codetest . Condition conditionFSTREQ = new com . ctrip . framework . cs . codetest . Condition ( "info" , "Lcom/ctrip/framework/cs/codetest/SampleClass$SampleInfo;" , Condition . STREQUAL , com . ctrip . framework . cs . asm . Opcodes . IFEQ , "samle<sp>info" , new ... | org . junit . Assert . assertEquals ( null , debugInfo ) |
testTextArrayInput ( ) { java . util . List < java . lang . String > input = new java . util . ArrayList < java . lang . String > ( 2 ) ; input . add ( "1" ) ; input . add ( "2" ) ; hivemall . tools . array . ToStringArrayUDF udf = new hivemall . tools . array . ToStringArrayUDF ( ) ; udf . initialize ( new org . apach... | org . junit . Assert . assertEquals ( input , output ) |
testBuild ( ) { java . util . function . Consumer < org . kie . workbench . common . stunner . core . client . components . palette . DefaultPaletteDefinition > resultConsumer = mock ( java . util . function . Consumer . class ) ; tested . build ( canvasHandler , resultConsumer ) ; verify ( resultConsumer , times ( 1 )... | org . junit . Assert . assertTrue ( org . kie . workbench . common . stunner . bpmn . client . components . palette . BPMNPaletteDefinitionBuilderTest . PALETTE_DEFINITION . getItems ( ) . isEmpty ( ) ) |
testThatBackstagePassesDropsQualityTo0WhenSellInIs0 ( ) { int initialQuality = 10 ; int initialSellIn = 0 ; Item sulfuras = new Item ( "Backstage<sp>passes<sp>to<sp>a<sp>TAFKAL80ETC<sp>concert" , initialSellIn , initialQuality ) ; GildedRose sut = new GildedRose ( sulfuras ) ; sut . updateQuality ( ) ; int worthlessPro... | org . junit . Assert . assertThat ( sulfuras . getQuality ( ) , org . hamcrest . core . Is . is ( worthlessProductQuality ) ) |
testIntId ( ) { net . vz . mongodb . jackson . mock . MockObjectIntId object = new net . vz . mongodb . jackson . mock . MockObjectIntId ( ) ; object . _id = 123456 ; net . vz . mongodb . jackson . JacksonDBCollection < net . vz . mongodb . jackson . mock . MockObjectIntId , java . lang . Integer > coll = getCollection... | org . junit . Assert . assertEquals ( object . _id , result . _id ) |
testTaskWithSingleDependency ( ) { final java . util . List < java . lang . String > sequence = new java . util . Vector ( ) ; org . opennms . core . tasks . AbstractTask task1 = createTask ( org . opennms . core . tasks . TaskTest . appender ( sequence , "task1" ) ) ; org . opennms . core . tasks . AbstractTask task2 ... | org . junit . Assert . assertArrayEquals ( new java . lang . String [ ] { "task1" , "task2" , "task3" } , sequence . toArray ( new java . lang . String [ 0 ] ) ) |
testUpdateTutor ( ) { com . mybatis3 . domain . Tutor tutor = new com . mybatis3 . domain . Tutor ( ) ; tutor . setTutorId ( 1 ) ; tutor . setName ( "sivaprasad" ) ; tutor . setEmail ( "sivaprasad@gmail.com" ) ; tutor = com . mybatis3 . services . TutorServiceTest . tutorService . updateTutor ( tutor ) ; com . mybatis3... | org . junit . Assert . assertNotNull ( updTutor ) |
test_dividedBy_doubleRoundingMode_one ( ) { org . joda . money . BigMoney test = org . joda . money . TestBigMoney . GBP_2_34 . dividedBy ( 1.0 , RoundingMode . DOWN ) ; "<AssertPlaceHolder>" ; } dividedBy ( long , java . math . RoundingMode ) { return with ( money . dividedBy ( valueToDivideBy , roundingMode ) ) ; } | org . junit . Assert . assertSame ( org . joda . money . TestBigMoney . GBP_2_34 , test ) |
testValidators ( ) { runner . enqueue ( new byte [ 0 ] ) ; java . util . Collection < org . apache . nifi . components . ValidationResult > results = ( ( org . apache . nifi . util . MockProcessContext ) ( runner . getProcessContext ( ) ) ) . validate ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return getValues ( ) . si... | org . junit . Assert . assertEquals ( 0 , results . size ( ) ) |
should_convert_with_annotated_property_with_custom_names ( ) { int idColumnIndex = 1 ; when ( metaData . getColumnCount ( ) ) . thenReturn ( 1 ) ; setColumnName ( "customNameId" , idColumnIndex ) ; setLongValue ( resultSet , idColumnIndex , java . lang . Long . valueOf ( 3 ) ) ; com . moandjiezana . dbutilsjpa . testut... | org . junit . Assert . assertEquals ( java . lang . Long . valueOf ( 3 ) , entity . getId ( ) ) |
testGetInt ( ) { java . sql . PreparedStatement preparedStatement = createMock ( java . sql . PreparedStatement . class ) ; java . sql . ResultSet resultSet = createMock ( java . sql . ResultSet . class ) ; int colN = 120 ; int val = 613123129 ; expect ( resultSet . getMetaData ( ) ) . andReturn ( null ) ; expect ( res... | org . junit . Assert . assertEquals ( val , results . getInt ( colN ) ) |
testAutocastByte ( ) { org . openl . meta . BigDecimalValue expectedResult = new org . openl . meta . BigDecimalValue ( "12" ) ; org . openl . meta . BigDecimalValue result = org . openl . meta . BigDecimalValue . autocast ( ( ( byte ) ( 12 ) ) , null ) ; "<AssertPlaceHolder>" ; } autocast ( byte , org . openl . meta .... | org . junit . Assert . assertEquals ( expectedResult , result ) |
deleteByConsumer ( ) { org . candlepin . model . activationkeys . ActivationKeyContentOverride cco1 = new org . candlepin . model . activationkeys . ActivationKeyContentOverride ( key , "test-content1" , "name1" , "value" ) ; activationKeyContentOverrideCurator . create ( cco1 ) ; org . candlepin . model . activationke... | org . junit . Assert . assertEquals ( ccoList . size ( ) , 0 ) |
testReadChineeseChars ( ) { java . lang . String nameStringUTF16 = "" ; java . lang . String bookStringUTF16 = ( "<Book><name>" + nameStringUTF16 ) + "</name></Book>" ; org . apache . cxf . jaxrs . provider . JAXBElementProvider < org . apache . cxf . jaxrs . resources . Book > p = new org . apache . cxf . jaxrs . prov... | org . junit . Assert . assertEquals ( book . getName ( ) , nameStringUTF16 ) |
testHTMLToDeveloper ( ) { java . util . List < java . lang . String > errors = messageManager . processMessage ( org . sagebionetworks . repo . manager . MessageManagerImplSESTest . MESSAGE_ID_HTML , mockProgressCallback ) ; "<AssertPlaceHolder>" ; } toString ( ) { double percent = ( ( ( double ) ( currentIndex ) ) / (... | org . junit . Assert . assertEquals ( errors . toString ( ) , 0 , errors . size ( ) ) |
testGetProviders ( ) { boolean isOpenToPublic = true ; java . lang . String provideNo1 = "111" ; java . lang . String providerNo2 = "222" ; java . lang . String providerNo3 = "333" ; org . oscarehr . common . model . FavoritesPrivilege favoritesPrivilege1 = new org . oscarehr . common . model . FavoritesPrivilege ( ) ;... | org . junit . Assert . assertTrue ( true ) |
testRequestWithNullFinishedTimeEndQuery ( ) { org . apache . hadoop . yarn . api . protocolrecords . GetApplicationsRequest request = org . apache . hadoop . yarn . server . resourcemanager . webapp . ApplicationsRequestBuilder . create ( ) . withFinishTimeEnd ( null ) . build ( ) ; org . apache . hadoop . yarn . api .... | org . junit . Assert . assertEquals ( expectedRequest , request ) |
setPhase_l3L1_phaseIsSet ( ) { java . lang . String phase = "L3-L1" ; sampledValue . setPhase ( phase ) ; "<AssertPlaceHolder>" ; } getPhase ( ) { return phase ; } | org . junit . Assert . assertThat ( sampledValue . getPhase ( ) , org . hamcrest . CoreMatchers . equalTo ( phase ) ) |
testMin01 ( ) { javax . el . ELProcessor processor = new javax . el . ELProcessor ( ) ; java . lang . Object result = processor . getValue ( "[1,2,3,4,5].stream().min()" , java . lang . Object . class ) ; "<AssertPlaceHolder>" ; } valueOf ( int ) { return org . apache . tomcat . util . net . jsse . openssl . Cipher . i... | org . junit . Assert . assertEquals ( java . lang . Long . valueOf ( 1 ) , ( ( org . apache . el . stream . Optional ) ( result ) ) . get ( ) ) |
testBatchedUpdateFailed ( ) { org . teiid . language . Insert command = ( ( org . teiid . language . Insert ) ( org . teiid . translator . jdbc . TranslationHelper . helpTranslate ( TranslationHelper . BQT_VDB , "insert<sp>into<sp>BQT1.SmallA<sp>(IntKey)<sp>values<sp>(1)" ) ) ) ; org . teiid . language . Insert command... | org . junit . Assert . assertArrayEquals ( new int [ ] { - 3 } , counts ) |
testCookieMissingOnLedgerDir ( ) { java . lang . String [ ] ledgerDirs = new java . lang . String [ ] { newDirectory ( ) , newDirectory ( ) , newDirectory ( ) } ; java . lang . String journalDir = newDirectory ( ) ; org . apache . bookkeeper . conf . ServerConfiguration conf = org . apache . bookkeeper . conf . TestBKC... | org . junit . Assert . assertTrue ( cookieFile . delete ( ) ) |
testFetchByPrimaryKeyExisting ( ) { com . liferay . journal . model . JournalArticleLocalization newJournalArticleLocalization = addJournalArticleLocalization ( ) ; com . liferay . journal . model . JournalArticleLocalization existingJournalArticleLocalization = _persistence . fetchByPrimaryKey ( newJournalArticleLocal... | org . junit . Assert . assertEquals ( existingJournalArticleLocalization , newJournalArticleLocalization ) |
testCreateBDocContainerSpecifiedByDocumentTypeForBDoc ( ) { org . digidoc4j . Container container = this . createEmptyContainerBy ( Container . DocumentType . BDOC ) ; container . addDataFile ( "src/test/resources/testFiles/helper-files/test.txt" , "text/plain" ) ; org . digidoc4j . test . util . TestDataBuilderUtil . ... | org . junit . Assert . assertTrue ( org . digidoc4j . utils . Helper . isZipFile ( new java . io . File ( file ) ) ) |
testToDBObject_and ( ) { final org . apache . rya . mongodb . document . visibility . DocumentVisibility dv = new org . apache . rya . mongodb . document . visibility . DocumentVisibility ( "A&B&C" ) ; final com . mongodb . BasicDBObject dbObject = org . apache . rya . mongodb . document . visibility . DocumentVisibili... | org . junit . Assert . assertEquals ( expected , dbObject ) |
isDiskImageIdValid_InvalidDiskImages ( ) { paramHandler . setDiskImageId ( "diskId" ) ; doReturn ( givenDiskImagesUniqueDiskname ( ) ) . when ( vServerProcessor . vsysComm ) . getDiskImages ( any ( org . oscm . app . iaas . PropertyHandler . class ) ) ; org . oscm . app . iaas . data . DiskImage validDiskImage = vServe... | org . junit . Assert . assertNull ( validDiskImage ) |
columnAlignmentTest ( ) { org . bitcoinj . utils . BtcFormat germany = org . bitcoinj . utils . BtcFormat . getCoinInstance ( 2 , BtcFixedFormat . REPEATING_PLACES ) ; char separator = germany . symbols ( ) . getDecimalSeparator ( ) ; org . bitcoinj . core . Coin [ ] rows = new org . bitcoinj . core . Coin [ ] { MAX_MO... | org . junit . Assert . assertEquals ( output [ i ] . indexOf ( separator ) , indexes [ i ] ) |
testOutboundUnsecuredResponse ( ) { gov . hhs . fha . nhinc . common . nhinccommonentity . RespondingGatewayPatientLocationQueryRequestType request = new gov . hhs . fha . nhinc . common . nhinccommonentity . RespondingGatewayPatientLocationQueryRequestType ( ) ; entityUnsecuredPLQ . setOutboundPLQ ( getStubbedOutbound... | org . junit . Assert . assertNotNull ( response ) |
shouldGetPropertiesForGetNodeProperties ( ) { long nodeId = org . neo4j . server . rest . web . RestfulGraphDatabaseTest . helper . createNode ( ) ; java . util . Map < java . lang . String , java . lang . Object > properties = new java . util . HashMap ( ) ; properties . put ( "foo" , "bar" ) ; properties . put ( "num... | org . junit . Assert . assertEquals ( properties , readProperties ) |
deleteRecursiveOnServiceException ( ) { org . mockito . Mockito . when ( mClient . listFiles ( org . mockito . Matchers . anyString ( ) , org . mockito . Matchers . anyString ( ) , org . mockito . Matchers . anyInt ( ) , org . mockito . Matchers . eq ( null ) ) ) . thenThrow ( alluxio . underfs . kodo . Exception . cla... | org . junit . Assert . assertFalse ( result ) |
shouldCheckIfUserHasSession ( ) { java . lang . String name = "Bobby" ; org . bukkit . entity . Player player = mock ( org . bukkit . entity . Player . class ) ; given ( player . getName ( ) ) . willReturn ( name ) ; given ( dataSource . hasSession ( name ) ) . willReturn ( false ) ; boolean result = sessionService . c... | org . junit . Assert . assertThat ( result , org . hamcrest . Matchers . equalTo ( false ) ) |
testDynamicQueryByProjectionMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . portal . workflow . kaleo . model . KaleoNotification . class , _dynamicQueryClassLoader ) ; dynamicQuery... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
testUserTransaction ( ) { "<AssertPlaceHolder>" ; } getUserTransaction ( ) { return ( ( javax . transaction . UserTransaction ) ( new javax . naming . InitialContext ( ) . lookup ( "java:jboss/UserTransaction" ) ) ) ; } | org . junit . Assert . assertNotNull ( getUserTransaction ( ) ) |
forEachWithIndexOver30 ( ) { java . lang . Iterable < java . lang . Integer > iterable = new org . eclipse . collections . impl . utility . internal . IterableIterateTest . IterableAdapter ( org . eclipse . collections . impl . utility . Iterate . sortThis ( org . eclipse . collections . impl . list . Interval . oneTo ... | org . junit . Assert . assertEquals ( index , ( object - 1 ) ) |
decideSourceWithoutDeviceAddressReturnsCEFHostname ( ) { final org . graylog . plugins . cef . parser . MappedMessage cefMessage = mock ( org . graylog . plugins . cef . parser . MappedMessage . class ) ; when ( cefMessage . host ( ) ) . thenReturn ( "128.66.23.42" ) ; when ( cefMessage . mappedExtensions ( ) ) . thenR... | org . junit . Assert . assertEquals ( "128.66.23.42" , codec . decideSource ( cefMessage , rawMessage ) ) |
testContainsMaterial ( ) { org . spout . api . inventory . ItemStack item = getRandomItem ( ) ; org . spout . api . material . Material mat = item . getMaterial ( ) ; inventory . clear ( ) ; inventory . add ( item ) ; "<AssertPlaceHolder>" ; } contains ( java . lang . Object ) { if ( o instanceof org . spout . api . ma... | org . junit . Assert . assertTrue ( inventory . contains ( mat ) ) |
testCompareToEqualDefinitionsChildId ( ) { org . eclipse . winery . common . ids . definitions . DefinitionsChildId policyTemplate = new org . eclipse . winery . common . ids . definitions . PolicyTemplateId ( "http://example.org/tosca/policyTemplates" , "myPolicyTemplate" , false ) ; org . eclipse . winery . common . ... | org . junit . Assert . assertEquals ( 0 , policyTemplate . compareTo ( secondPolicyTemplate ) ) |
openingExistingContainer_withLarge2MbFile_shouldNotStoreDataFilesOnDisk ( ) { this . configuration = org . digidoc4j . Configuration . of ( Configuration . Mode . TEST ) ; configuration . setMaxFileSizeCachedInMemoryInMB ( 4 ) ; org . digidoc4j . Container container = this . openContainerByConfiguration ( java . nio . ... | org . junit . Assert . assertEquals ( 1 , container . getDataFiles ( ) . size ( ) ) |
testWafterW ( ) { org . zoodb . internal . util . RWSemaphore < java . lang . Object > s = new org . zoodb . internal . util . RWSemaphore ( ) ; org . zoodb . test . util . RWSemaphoreTest . GetWLOCK w1 = new org . zoodb . test . util . RWSemaphoreTest . GetWLOCK ( s ) ; w1 . start ( ) ; w1 . join ( ) ; org . zoodb . t... | org . junit . Assert . assertTrue ( w2 . isAlive ( ) ) |
testConvertEmpty ( ) { java . lang . Float result = underTest . convert ( "" ) ; "<AssertPlaceHolder>" ; } convert ( java . lang . String ) { if ( "S" . equalsIgnoreCase ( value ) ) { return Size . TINY ; } else if ( "M" . equalsIgnoreCase ( value ) ) { return Size . NORMAL ; } else if ( "L" . equalsIgnoreCase ( value ... | org . junit . Assert . assertNull ( result ) |
validate_idTagInfoNotValid_returnFalse ( ) { eu . chargetime . ocpp . model . core . IdTagInfo idTagInfo = mock ( eu . chargetime . ocpp . model . core . IdTagInfo . class ) ; confirmation . setIdTagInfo ( idTagInfo ) ; when ( idTagInfo . validate ( ) ) . thenReturn ( false ) ; boolean isValid = confirmation . validate... | org . junit . Assert . assertThat ( isValid , org . hamcrest . CoreMatchers . is ( false ) ) |
testExternalFileWithLink ( ) { java . lang . String $ref = "http://foo.bar#/examples/address-example.json" ; validator . validate ( vh , context , key , $ref ) ; "<AssertPlaceHolder>" ; } getEventsSize ( ) { return result . getEvents ( ) . size ( ) ; } | org . junit . Assert . assertEquals ( 0 , vh . getEventsSize ( ) ) |
testGoedPad ( ) { org . mockito . Mockito . when ( zoekPersoonRepository . zoekPersonen ( org . mockito . Mockito . any ( nl . bzk . brp . delivery . dataaccess . bevraging . SqlStamementZoekPersoon . class ) , org . mockito . Mockito . anyBoolean ( ) ) ) . thenReturn ( com . google . common . collect . Lists . newArra... | org . junit . Assert . assertEquals ( 3 , ids . size ( ) ) |
testGetColumnVisibilityBlank ( com . boozallen . cognition . ingest . storm . vo . LogRecord , org . apache . accumulo . core . security . ColumnVisibility ) { bolt . visibility = null ; bolt . visibilityByField = null ; new com . boozallen . cognition . ingest . accumulo . storm . Expectations ( ) { { new org . apache... | org . junit . Assert . assertThat ( bolt . getColumnVisibility ( record ) , org . hamcrest . core . Is . is ( vis ) ) |
TSExplicitFactory ( ) { java . lang . String value = "CONNECT" ; gov . hhs . fha . nhinc . transform . subdisc . HL7DataTransformHelper helper = new gov . hhs . fha . nhinc . transform . subdisc . HL7DataTransformHelper ( ) ; org . hl7 . v3 . TSExplicit ts = new org . hl7 . v3 . TSExplicit ( ) ; ts = helper . TSExplici... | org . junit . Assert . assertEquals ( ts . getValue ( ) , "CONNECT" ) |
testNoRewriteAnimatedGIF ( ) { org . apache . shindig . gadgets . http . HttpResponseBuilder response = getImageResponse ( org . apache . shindig . gadgets . rewrite . image . ImageRewriterTest . CONTENT_TYPE_GIF , getImageBytes ( "org/apache/shindig/gadgets/rewrite/image/animated.gif" ) ) ; int changesBefore = respons... | org . junit . Assert . assertEquals ( changesBefore , response . getNumChanges ( ) ) |
test2 ( ) { final com . persistit . Exchange ex = _persistit . getExchange ( "persistit" , "bug70612" , true ) ; final java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; ex . removeAll ( ) ; ex . setSplitPolicy ( SplitPolicy . LEFT_BIAS ) ; sb . setLength ( 100 ) ; ex . getValue ( ) . put ( sb . toS... | org . junit . Assert . assertTrue ( ( ( ex . getValue ( ) . getString ( ) . length ( ) ) == 427 ) ) |
testLeftLongInteger ( ) { long expected = 20 ; long actual = cFunction . left ( 10L , 1 ) ; "<AssertPlaceHolder>" ; } left ( java . lang . Integer , java . lang . Long ) { return l1 << l2 ; } | org . junit . Assert . assertEquals ( expected , actual ) |
testNotBlankMsgEmptyStringShouldThrow ( ) { java . lang . String string = "" ; try { org . apache . commons . lang3 . Validate . notBlank ( string , "Message" ) ; org . junit . Assert . fail ( "Expecting<sp>IllegalArgumentException" ) ; } catch ( java . lang . IllegalArgumentException e ) { "<AssertPlaceHolder>" ; } } ... | org . junit . Assert . assertEquals ( "Message" , e . getMessage ( ) ) |
testName_Gets_Name_From_Element ( ) { mmarquee . automation . AutomationElement element = org . mockito . Mockito . mock ( mmarquee . automation . AutomationElement . class ) ; mmarquee . automation . pattern . SelectionItem selection = org . mockito . Mockito . mock ( mmarquee . automation . pattern . SelectionItem . ... | org . junit . Assert . assertTrue ( name . equals ( "NAME" ) ) |
getMailForCompletion_empty ( ) { java . lang . String mailAddress = "" ; propertyHandler . getSettings ( ) . getParameters ( ) . put ( PropertyHandler . MAIL_FOR_COMPLETION , new org . oscm . app . v2_0 . data . Setting ( PropertyHandler . MAIL_FOR_COMPLETION , mailAddress ) ) ; java . lang . String mail = propertyHand... | org . junit . Assert . assertNull ( mail ) |
testGridArrayAscii ( ) { java . lang . String endpoint = thredds . TestOnLocalServer . withHttpPath ( "/dodsC/scanCdmUnitTests/tds/ncep/NAM_CONUS_20km_selectsurface_20100913_0000.grib2.ascii?Visibility_surface[0:1:0][0:1:0][0:1:0]" ) ; byte [ ] result = thredds . TestOnLocalServer . getContent ( endpoint , 200 , null )... | org . junit . Assert . assertNotNull ( result ) |
testObjectInjectConfigurationBuilder ( ) { final java . lang . Integer integer = 1 ; final java . lang . Float ffloat = 1.001F ; final org . apache . reef . tang . JavaClassHierarchy namespace = Tang . Factory . getTang ( ) . getDefaultClassHierarchy ( ) ; final org . apache . reef . tang . types . NamedParameterNode <... | org . junit . Assert . assertEquals ( expected , actual ) |
testDdl_TYPE_NUMERIC_5 ( ) { java . lang . String ddl = ( "CREATE<sp>FOREIGN<sp>TABLE<sp>ONE_TYPE<sp>(" + ( org . teiid . designer . vdb . dynamic . TestModelToDdlGenerator . BQT2_TYPE_DDL . TYPE_NUMERIC_5 ) ) + ")<sp>OPTIONS(UPDATABLE<sp>'TRUE');" ; java . lang . String expectedDdl = ( "CREATE<sp>FOREIGN<sp>TABLE<sp>O... | org . junit . Assert . assertEquals ( expectedDdl , generatedDdl ) |
testParseSampleCCDDocument ( ) { java . io . InputStream is = getClass ( ) . getResourceAsStream ( "/builders/content/document/SampleCCDDocument.xml" ) ; org . openhealthtools . ihe . common . cdar2 . POCDMT000040ClinicalDocument clinicalDocument = parser . parse ( is ) ; "<AssertPlaceHolder>" ; } parse ( java . lang .... | org . junit . Assert . assertNotNull ( clinicalDocument ) |
testSerialization ( ) { org . jfree . chart . entity . TickLabelEntity e1 = new org . jfree . chart . entity . TickLabelEntity ( new java . awt . geom . Rectangle2D . Double ( 1.0 , 2.0 , 3.0 , 4.0 ) , "ToolTip" , "URL" ) ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io... | org . junit . Assert . assertEquals ( e1 , e2 ) |
testGetFlowSheetDrugs ( ) { java . lang . String flowsheet1 = "alpha" ; java . lang . String flowsheet2 = "bravo" ; boolean isArchived = true ; int demographicNo1 = 111 ; int demographicNo2 = 222 ; org . oscarehr . common . model . FlowSheetDrug flowSheetDrug1 = new org . oscarehr . common . model . FlowSheetDrug ( ) ;... | org . junit . Assert . assertTrue ( true ) |
testBlockComment ( ) { java . io . File f = net . roboconf . core . internal . tests . TestUtils . findTestFile ( "/textactions/non-commented.txt" ) ; java . lang . String s = net . roboconf . core . utils . Utils . readFileContent ( f ) ; net . roboconf . tooling . core . textactions . CommentAction action = new net .... | org . junit . Assert . assertEquals ( s , result ) |
doesNotDeclareEquals ( ) { nl . jqno . equalsverifier . internal . reflection . ClassAccessor < ? > accessor = nl . jqno . equalsverifier . internal . reflection . ClassAccessor . of ( nl . jqno . equalsverifier . internal . reflection . Empty . class , prefabValues ) ; "<AssertPlaceHolder>" ; } declaresEquals ( ) { re... | org . junit . Assert . assertFalse ( accessor . declaresEquals ( ) ) |
testJsonSerialization ( ) { org . batfish . datamodel . OspfIntraAreaRoute r = org . batfish . datamodel . OspfIntraAreaRoute . builder ( ) . setArea ( 0 ) . setNetwork ( Prefix . ZERO ) . build ( ) ; "<AssertPlaceHolder>" ; } clone ( java . lang . Object , java . lang . Class ) { return org . batfish . common . util .... | org . junit . Assert . assertThat ( org . batfish . common . util . BatfishObjectMapper . clone ( r , org . batfish . datamodel . OspfIntraAreaRoute . class ) , org . hamcrest . Matchers . equalTo ( r ) ) |
createsTupleOfTwoThings ( ) { "<AssertPlaceHolder>" ; } tupler ( A , B ) { return com . jnape . palatable . lambda . functions . builtin . fn2 . Tupler2 . < A , B > tupler ( a ) . apply ( b ) ; } | org . junit . Assert . assertThat ( com . jnape . palatable . lambda . functions . builtin . fn2 . Tupler2 . tupler ( "a" , 1 ) , org . hamcrest . core . Is . is ( tuple ( "a" , 1 ) ) ) |
parseContainsFilter ( ) { org . deegree . filter . Filter filter = testImportExportImport ( "testfilter17.xml" ) ; "<AssertPlaceHolder>" ; } testImportExportImport ( java . lang . String ) { java . net . URL url = org . deegree . filter . xml . Filter110XMLEncoderTest . class . getResource ( ( "v110/" + resource ) ) ; ... | org . junit . Assert . assertNotNull ( filter ) |
testGetCommandDescriptionsWithOtherChannelType ( ) { org . eclipse . smarthome . core . thing . Channel channel = org . eclipse . smarthome . core . thing . binding . builder . ChannelBuilder . create ( new org . eclipse . smarthome . core . thing . ChannelUID ( "binding:thing-type:thing:channel" ) , "String" ) . build... | org . junit . Assert . assertNull ( commandDescription ) |
canConstructServerContainerForServletHandlerContext ( ) { be . tomcools . dropwizard . websocket . handling . WebsocketContainer container = sut . initialize ( configuration , servletContextHandler ) ; "<AssertPlaceHolder>" ; } initialize ( be . tomcools . dropwizard . websocket . WebsocketConfiguration , io . dropwiza... | org . junit . Assert . assertNotNull ( container ) |
testDoubleObject ( ) { java . lang . Double t = 1.0 ; t = roundTrip ( t , org . apache . juneau . a . rttests . Double . class ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( new java . lang . Double ( 1.0 ) , t ) |
shouldCopyContentsOfOneInputStreamToAnother ( ) { final byte [ ] expected = createByteArray ( ) ; final java . io . InputStream actualStream = org . pitest . highwheel . util . StreamUtil . copyStream ( new java . io . ByteArrayInputStream ( createByteArray ( ) ) ) ; final byte [ ] actualContents = org . pitest . highw... | org . junit . Assert . assertArrayEquals ( expected , actualContents ) |
whenStringFromAToZContainsSubstringStuThenResultTrue ( ) { vkaretko . SubString subStr = new vkaretko . SubString ( ) ; java . lang . String testString = "abcdefghijklmnopqrstuvwxyz" ; java . lang . String testSubString = "stu" ; "<AssertPlaceHolder>" ; } contains ( java . lang . String , java . lang . String ) { boole... | org . junit . Assert . assertThat ( subStr . contains ( testString , testSubString ) , org . hamcrest . core . Is . is ( true ) ) |
testShort ( ) { java . lang . String [ ] shortSentence = new java . lang . String [ ] { "word" } ; final int testTokenIndex = 0 ; opennlp . tools . util . featuregen . AdaptiveFeatureGenerator generator = new opennlp . tools . util . featuregen . BigramNameFeatureGenerator ( ) ; generator . createFeatures ( features , ... | org . junit . Assert . assertEquals ( 0 , features . size ( ) ) |
testEmptyConfig ( ) { nl . topicus . bitbucket . persistence . WebHookConfiguration dummyConfiguration = createDummyConfiguration ( ) ; dummyConfiguration . setBranchesToIgnore ( "" ) ; nl . topicus . bitbucket . api . PushEventService pushEventService = new nl . topicus . bitbucket . api . PushEventService ( dummyConf... | org . junit . Assert . assertThat ( pushEventService . isValidEvent ( dummyEvent , dummyConfiguration ) , org . hamcrest . Matchers . is ( true ) ) |
testBuildNonKeyValueMeta ( ) { org . pentaho . bigdata . api . hbase . HBaseService hBaseService = mock ( org . pentaho . bigdata . api . hbase . HBaseService . class ) ; org . pentaho . bigdata . api . hbase . ByteConversionUtil byteConversionUtil = mock ( org . pentaho . bigdata . api . hbase . ByteConversionUtil . c... | org . junit . Assert . assertNotNull ( column ) |
testIntConstructor ( ) { interceptor = new org . terasoluna . gfw . web . token . transaction . TransactionTokenInterceptor ( 10 ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( interceptor ) |
shouldSkipCustomListeners ( ) { org . camunda . bpm . engine . repository . ProcessDefinition processDefinition = testRule . deployAndGetDefinition ( modify ( ProcessModels . TWO_TASKS_PROCESS ) . activityBuilder ( "userTask1" ) . camundaExecutionListenerClass ( ExecutionListener . EVENTNAME_START , org . camunda . bpm... | org . junit . Assert . assertEquals ( 0 , IncrementCounterListener . counter ) |
badFilenames ( ) { ch . qos . logback . core . rolling . helper . FileNamePattern fileNamePattern = new ch . qos . logback . core . rolling . helper . FileNamePattern ( "smoke-%d-%i.gz" , context ) ; ch . qos . logback . core . rolling . helper . SizeAndTimeBasedArchiveRemover remover = new ch . qos . logback . core . ... | org . junit . Assert . assertArrayEquals ( expected , fileArray ) |
forLoop ( ) { com . gs . collections . api . bag . sorted . ImmutableSortedBag < java . lang . Integer > bag = this . classUnderTest ( ) ; for ( java . lang . Integer each : bag ) { "<AssertPlaceHolder>" ; } } classUnderTest ( ) { return SortedBags . immutable . empty ( ) ; } | org . junit . Assert . assertNotNull ( each ) |
testQueryListAllShardsWithCallback ( ) { try { com . ctrip . platform . dal . dao . shard . DalHints hints = new com . ctrip . platform . dal . dao . shard . DalHints ( ) ; java . util . List < java . lang . Short > result = queryListInAllShard ( hints . callbackWith ( new com . ctrip . platform . dal . dao . shard . D... | org . junit . Assert . assertNull ( result ) |
testReplacementForCollapsePathDots ( ) { java . lang . String [ ] testData = new java . lang . String [ ] { "/foo/bar.html" , "/foo/bar.html" , "/foo/../bar.html" , "/bar.html" , "/foo/moo/../../bar.html" , "/bar.html" , "/foo//bar.html" , "/foo/bar.html" , "/foo/./bar.html" , "/foo/bar.html" , "/a/b/../../c" , "/c" , ... | org . junit . Assert . assertEquals ( testData [ i ] , testData [ ( i + 1 ) ] , actualResult ) |
testGetRequiredHostGroups___defaultUpdater ( ) { java . util . Map < java . lang . String , java . util . Map < java . lang . String , java . lang . String > > properties = new java . util . HashMap ( ) ; java . util . Map < java . lang . String , java . lang . String > coreSiteMap = new java . util . HashMap ( ) ; cor... | org . junit . Assert . assertEquals ( com . google . common . collect . ImmutableSet . of ( "group1" , "group2" , "group3" , "core-site" 0 , "core-site" 1 ) , requiredGroups ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.