input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testRemove ( ) { com . liferay . knowledge . base . model . KBComment newKBComment = addKBComment ( ) ; _persistence . remove ( newKBComment ) ; com . liferay . knowledge . base . model . KBComment existingKBComment = _persistence . fetchByPrimaryKey ( newKBComment . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getP... | org . junit . Assert . assertNull ( existingKBComment ) |
returnLastSavedValueWhenColumNameIsTheSameSplitByColumn ( ) { when ( reader . currentValue ( ) ) . thenReturn ( new org . apache . sqoop . mapreduce . db . TestSQLServerDBRecordReader . SqlTableClassStub ( org . apache . sqoop . mapreduce . db . TestSQLServerDBRecordReader . COL_NAME_SAME_AS_SPLIT_BY , org . apache . s... | org . junit . Assert . assertEquals ( org . apache . sqoop . mapreduce . db . TestSQLServerDBRecordReader . ANY_VALUE_FOR_COL , reader . getLastRecordValue ( ) ) |
keySet_ToArray_withLargeTarget ( ) { com . gs . collections . api . map . MutableMap < java . lang . Integer , java . lang . String > map = this . newMapWithKeysValues ( 1 , "One" , 2 , "Two" , 3 , "Three" , 4 , "Four" ) ; java . lang . Integer [ ] target = new java . lang . Integer [ 6 ] ; target [ 4 ] = 42 ; target [... | org . junit . Assert . assertArrayEquals ( new java . lang . Integer [ ] { 1 , 2 , 3 , 4 , 42 , null } , result ) |
testBucketSortPipelineAggregation ( ) { com . liferay . portal . search . aggregation . pipeline . BucketSortPipelineAggregation bucketSortPipelineAggregation = com . liferay . portal . search . aggregations . test . AggregationsInstantiationTest . _aggregations . bucketSort ( "name" ) ; "<AssertPlaceHolder>" ; } bucke... | org . junit . Assert . assertNotNull ( bucketSortPipelineAggregation ) |
testMallocAndFree ( ) { int pointer = m . malloc ( m_allocationSize ) ; m . free ( pointer ) ; "<AssertPlaceHolder>" ; } usedBlocks ( ) { return m_blocks . usedBlocks ( ) ; } | org . junit . Assert . assertEquals ( 0 , m . usedBlocks ( ) ) |
testGetParamTest ( ) { java . util . Map < java . lang . String , java . lang . String > map = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; map . put ( "testKey" , "testVal" ) ; RequestParser < String > . ParsedRequest parsed = target . new org . o3project . odenos . remoteobject . Pa... | org . junit . Assert . assertThat ( parsed . getParam ( "testKey" ) , org . hamcrest . CoreMatchers . is ( "testVal" ) ) |
testQueueLimiting ( ) { org . apache . hadoop . test . GenericTestUtils . DelayAnswer delayer = new org . apache . hadoop . test . GenericTestUtils . DelayAnswer ( org . apache . hadoop . hdfs . qjournal . client . TestIPCLoggerChannel . LOG ) ; org . mockito . Mockito . doAnswer ( delayer ) . when ( mockProxy ) . jour... | org . junit . Assert . assertEquals ( org . apache . hadoop . hdfs . qjournal . client . TestIPCLoggerChannel . LIMIT_QUEUE_SIZE_BYTES , ch . getQueuedEditsSize ( ) ) |
shouldEscapeDollarSign ( ) { final java . lang . String glob = new java . lang . String ( "org$bar" ) ; "<AssertPlaceHolder>" ; } matches ( java . lang . String , java . lang . String ) { return java . util . regex . Pattern . matches ( org . pitest . highwheel . util . GlobToRegex . convertGlobToRegex ( String ) , val... | org . junit . Assert . assertTrue ( matches ( glob , "org$bar" ) ) |
testEquals_equalsItself ( ) { org . eclipse . rap . rwt . template . Position position = new org . eclipse . rap . rwt . template . Position ( 3.14F , 42 ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) return true ; if ( obj == null ) return false ; if ( ( getClass ( ) ) != ( obj ... | org . junit . Assert . assertTrue ( position . equals ( position ) ) |
testDataStoreNameIsSet ( ) { doAnswer ( new org . mockito . stubbing . Answer ( ) { @ org . jbpm . workbench . pr . client . editors . variables . list . Override public org . jbpm . workbench . pr . client . editors . variables . list . Void answer ( org . mockito . invocation . InvocationOnMock invocationOnMock ) thr... | org . junit . Assert . assertNotNull ( columnMeta . getColumn ( ) . getDataStoreName ( ) ) |
testRevokeTablePermission ( ) { datawave . webservice . result . VoidResponse voidResponse = permissionsBean . revokeTablePermission ( "test" , "table" , "GRANT" ) ; "<AssertPlaceHolder>" ; } revokeTablePermission ( java . lang . String , java . lang . String , org . apache . accumulo . core . security . TablePermissio... | org . junit . Assert . assertNotNull ( voidResponse ) |
testRemoveJobType_Null ( ) { final java . util . Map < java . lang . String , java . lang . Class < ? > > jobTypes = new java . util . HashMap < java . lang . String , java . lang . Class < ? > > ( ) ; jobTypes . put ( "TestRunnableJob" , net . greghaines . jesque . worker . TestMapBasedJobFactory . TestRunnableJob . c... | org . junit . Assert . assertEquals ( jobTypes , jobFactory . getJobTypes ( ) ) |
testRhinoScriptResolving ( ) { final java . lang . String scriptText = "file.owner.name" ; org . mozilla . javascript . ContextFactory contextFactory = org . mozilla . javascript . ContextFactory . getGlobal ( ) ; final java . lang . Object script = contextFactory . call ( new org . mozilla . javascript . ContextAction... | org . junit . Assert . assertNotNull ( result ) |
whenParseDateTodayThenResultTimeStamp ( ) { java . sql . Timestamp date = pj . parseDate ( ",<sp>19:13" ) ; java . sql . Timestamp today = new java . sql . Timestamp ( java . lang . System . currentTimeMillis ( ) ) ; "<AssertPlaceHolder>" ; } getDate ( ) { return date ; } | org . junit . Assert . assertThat ( date . getDate ( ) , org . hamcrest . core . Is . is ( today . getDate ( ) ) ) |
testIsSymbolicLinkWithSymbolicLink ( ) { java . io . File source = prepareFile ( ) ; java . io . File target = tmpFolder . newFile ( "target" ) ; com . sap . prd . mobile . ios . mios . FileUtils . createSymbolicLink ( source , target ) ; "<AssertPlaceHolder>" ; } isSymbolicLink ( java . io . File ) { if ( ( file == nu... | org . junit . Assert . assertTrue ( com . sap . prd . mobile . ios . mios . FileUtils . isSymbolicLink ( target ) ) |
testGetDeliverer_nonExistent ( ) { org . kuali . rice . kcb . bo . MessageDelivery mockInvalid = new org . kuali . rice . kcb . bo . MessageDelivery ( ) ; mockInvalid . setDelivererTypeName ( TestConstants . NON_EXISTENT_DELIVERER_NAME ) ; boolean caughtException = false ; org . kuali . rice . kcb . deliverer . Message... | org . junit . Assert . assertNull ( deliverer ) |
testGetStreamArn ( ) { when ( mockRequest . getStreamName ( ) ) . thenReturn ( TEST_STRING ) ; java . lang . String actual = adapter . getStreamArn ( ) ; "<AssertPlaceHolder>" ; } getStreamArn ( ) { return internalRequest . getStreamName ( ) ; } | org . junit . Assert . assertEquals ( TEST_STRING , actual ) |
testParseNull ( ) { "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { if ( s == null ) { return null ; } java . lang . String [ ] part = s . split ( ":" ) ; if ( ( part [ 0 ] . contains ( "POTION" ) ) || ( part [ 0 ] . equalsIgnoreCase ( "TIPPED_ARROW" ) ) ) { return world . bentobox . bentobox . util . ItemPa... | org . junit . Assert . assertNull ( world . bentobox . bentobox . util . ItemParser . parse ( null ) ) |
Create3G_test15 ( ) { com . att . aro . core . configuration . pojo . Profile3G profile3g = mock ( com . att . aro . core . configuration . pojo . Profile3G . class ) ; when ( profile3g . getProfileType ( ) ) . thenReturn ( ProfileType . T3G ) ; when ( profile3g . getIdleDchPromoAvg ( ) ) . thenReturn ( 12000.0 ) ; whe... | org . junit . Assert . assertEquals ( 1 , testList . size ( ) ) |
testIsAsyncEventQueueUsingDiskStore ( ) { final java . lang . String diskStoreName = "testDiskStore" ; final com . gemstone . gemfire . cache . asyncqueue . AsyncEventQueue mockQueue = mockContext . mock ( com . gemstone . gemfire . cache . asyncqueue . AsyncEventQueue . class , "AsyncEventQueue" ) ; final com . gemsto... | org . junit . Assert . assertTrue ( function . isUsingDiskStore ( mockQueue , mockDiskStore ) ) |
testSetPolicyAtTestPath ( ) { javax . jcr . security . AccessControlPolicyIterator it = acMgr . getApplicablePolicies ( org . apache . jackrabbit . oak . security . authorization . composite . CompositeAccessControlManagerTest . TEST_PATH ) ; int cnt = 0 ; while ( it . hasNext ( ) ) { javax . jcr . security . AccessCon... | org . junit . Assert . assertEquals ( 2 , cnt ) |
testContextLoading ( ) { org . springframework . context . ApplicationContext context = new org . springframework . context . support . ClassPathXmlApplicationContext ( "classpath:spring-test-async-server.xml" ) ; org . jboss . resteasy . core . AsynchronousDispatcher dispatcher = ( ( org . jboss . resteasy . core . As... | org . junit . Assert . assertNotNull ( dispatcher ) |
testPost ( ) { java . lang . String s = org . jboss . resteasy . test . rx . rxjava2 . Rx2SingleProxyServerAsyncTest . proxy . post ( "a" ) ; "<AssertPlaceHolder>" ; } post ( java . lang . String ) { return org . jboss . resteasy . test . rx . rxjava2 . resource . Rx2ObservableResourceNoStreamImpl . buildObservableStri... | org . junit . Assert . assertEquals ( "a" , s ) |
deveGerarXMLDeAcordoComOPadraoEstabelecido ( ) { final com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemImpostoICMS20 icms20 = new com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemImpostoICMS20 ( ) ; icms20 . setModalidadeBCICMS ( NFNotaInfoItemModalidadeBCICMS . PAUT... | org . junit . Assert . assertEquals ( xmlEsperado , icms20 . toString ( ) ) |
testRenameCommand ( ) { final org . kie . workbench . common . widgets . metadata . client . TestDocument document = createTestDocument ( ) ; final org . uberfire . backend . vfs . ObservablePath path = document . getLatestPath ( ) ; registerDocument ( document ) ; final org . mockito . ArgumentCaptor < org . uberfire ... | org . junit . Assert . assertNotNull ( renameCommand ) |
testLinear ( ) { mikera . vectorz . Op op = Ops . LINEAR ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( op ) |
findJobTracker_EntryNameNotFound ( ) { org . pentaho . di . core . gui . JobTracker jobTracker = org . pentaho . di . core . gui . JobTrackerTest . createTracker ( ) ; for ( int i = 0 ; i < 3 ; i ++ ) { jobTracker . addJobTracker ( org . pentaho . di . core . gui . JobTrackerTest . createTracker ( java . lang . Integer... | org . junit . Assert . assertNull ( jobTracker . findJobTracker ( copy ) ) |
testLoad ( ) { java . util . List < io . yawp . driver . postgresql . configuration . XmlLoader > envs = loadFromXml ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return order . size ( ) ; } | org . junit . Assert . assertEquals ( 4 , envs . size ( ) ) |
testLast ( ) { "<AssertPlaceHolder>" ; } last ( ) { final org . drools . verifier . core . index . select . Select < T > . Entry < T > entry = lastEntry ( ) ; if ( entry == null ) { return null ; } else { return entry . getValue ( ) ; } } | org . junit . Assert . assertNull ( select . last ( ) ) |
testGetCheckedoutDocs ( ) { org . pentaho . platform . util . client . BiPlatformRepositoryClientNavigationServiceTest . mLog . info ( "testGetCheckedoutDocs.." ) ; try { navService . getCheckedoutDocs ( BiPlatformRepositoryClient . PLATFORMORIG , "/admin/sales_data.csv" , "filter" , false , false , 3 , 0 ) ; } catch (... | org . junit . Assert . assertTrue ( ( exe instanceof org . pentaho . commons . util . repository . exception . OperationNotSupportedException ) ) |
testNewStager_yaml ( ) { org . mockito . Mockito . when ( stageMojo . isAppEngineCompatiblePackaging ( ) ) . thenReturn ( true ) ; org . mockito . Mockito . when ( stageMojo . isAppEngineWebXmlBased ( ) ) . thenReturn ( false ) ; org . mockito . Mockito . when ( stageMojo . getArtifact ( ) ) . thenReturn ( tempFolder .... | org . junit . Assert . assertEquals ( com . google . cloud . tools . maven . stage . AppYamlStager . class , stager . getClass ( ) ) |
testUnassignedWildcardFragmentRuleCall ( ) { org . eclipse . xtend2 . lib . StringConcatenation _builder = new org . eclipse . xtend2 . lib . StringConcatenation ( ) ; _builder . append ( "Rule:<sp>Called;" ) ; _builder . newLine ( ) ; _builder . append ( "fragment<sp>Called*:<sp>name=ID;" ) ; _builder . newLine ( ) ; ... | org . junit . Assert . assertEquals ( expected , actual ) |
testCreateStorageUnitNotificationRegistration ( ) { org . finra . herd . model . api . xml . NotificationRegistrationKey notificationRegistrationKey = new org . finra . herd . model . api . xml . NotificationRegistrationKey ( NAMESPACE , NOTIFICATION_NAME ) ; org . finra . herd . model . api . xml . StorageUnitNotifica... | org . junit . Assert . assertEquals ( storageUnitNotificationRegistration , resultStorageUnitNotificationRegistration ) |
testAddMultipleFragmentEntries ( ) { com . liferay . portal . kernel . service . ServiceContext serviceContext = com . liferay . portal . kernel . test . util . ServiceContextTestUtil . getServiceContext ( _group . getGroupId ( ) , com . liferay . portal . kernel . test . util . TestPropsValues . getUserId ( ) ) ; com ... | org . junit . Assert . assertEquals ( actualFragmentEntries . toString ( ) , ( ( originalFragmentEntries . size ( ) ) + 2 ) , actualFragmentEntries . size ( ) ) |
testNotNull ( ) { final joinery . DataFrame < java . lang . Boolean > nonnulls = df . notnull ( ) ; final java . lang . Object [ ] expected = new java . lang . Boolean [ ] { true , true , true , true , true , true , true , true , true , true , true , true , true , true , true , true , true , true , true , true , true ,... | org . junit . Assert . assertArrayEquals ( expected , nonnulls . toArray ( ) ) |
test_GetCustomByClassName_By_Name ( ) { mmarquee . automation . BaseAutomationTest . setElementClassName ( elem , "BlaBla" ) ; mmarquee . automation . BaseAutomationTest . setElementCurrentName ( elem , "myName" ) ; when ( element . findFirst ( mmarquee . automation . BaseAutomationTest . isTreeScope ( TreeScope . Desc... | org . junit . Assert . assertEquals ( targetElement , bar . getElement ( ) ) |
testModelDefinition ( ) { final java . util . Optional < org . kie . workbench . common . dmn . api . definition . v1_1 . Invocation > oModel = definition . getModelClass ( ) ; "<AssertPlaceHolder>" ; } isPresent ( ) { return isPresent ; } | org . junit . Assert . assertTrue ( oModel . isPresent ( ) ) |
testFetchByPrimaryKeysWithMultiplePrimaryKeysWhereNoPrimaryKeysExist ( ) { long pk1 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; long pk2 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; java . util . Set < java . io . Serializable > primaryKeys = ne... | org . junit . Assert . assertTrue ( layouts . isEmpty ( ) ) |
shouldCallConsumerProvidingTheDescriptionWhenThresholdIsTrue ( ) { java . lang . String description = "description" ; org . neo4j . kernel . impl . transaction . log . checkpoint . AbstractCheckPointThreshold threshold = new org . neo4j . kernel . impl . transaction . log . checkpoint . AbstractCheckPointThresholdTest ... | org . junit . Assert . assertEquals ( description , calledWith . get ( ) ) |
testFirstDLSNAsync ( ) { org . apache . distributedlog . DLSN dlsn = mock ( org . apache . distributedlog . DLSN . class ) ; when ( impl . getFirstDLSNAsync ( ) ) . thenReturn ( java . util . concurrent . CompletableFuture . completedFuture ( dlsn ) ) ; "<AssertPlaceHolder>" ; verify ( impl , times ( 1 ) ) . getFirstDL... | org . junit . Assert . assertEquals ( dlsn , org . apache . distributedlog . util . FutureUtils . result ( manager . getFirstDLSNAsync ( ) ) ) |
testReduceRight15 ( ) { final java . util . concurrent . atomic . AtomicBoolean parCorrect = new java . util . concurrent . atomic . AtomicBoolean ( false ) ; org . stjs . javascript . Array < java . lang . Object > arr = org . stjs . javascript . JSCollections . $array ( 0 , 1 , true , null , new java . lang . Object ... | org . junit . Assert . assertEquals ( 0 , arr . reduceRight ( callbackfn , initialValue ) ) |
testActionProcessWrongZipFile ( ) { boolean failure = false ; try { executeAction ( "fake" , "zip" ) ; } catch ( it . geosolutions . geobatch . flow . event . action . ActionException e ) { failure = true ; } catch ( java . net . URISyntaxException e ) { org . junit . Assert . fail ( ( "Failure<sp>in<sp>loading<sp>reso... | org . junit . Assert . assertTrue ( failure ) |
testFetchByPrimaryKeyMissing ( ) { long pk = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; com . liferay . portal . kernel . model . LayoutFriendlyURL missingLayoutFriendlyURL = _persistence . fetchByPrimaryKey ( pk ) ; "<AssertPlaceHolder>" ; } fetchByPrimaryKey ( long ) { return com ... | org . junit . Assert . assertNull ( missingLayoutFriendlyURL ) |
givenResultErrorWhenAddingErrorThenAddErrorIds ( ) { final fr . gouv . vitam . metadata . core . database . collections . ResultError resultError = new fr . gouv . vitam . metadata . core . database . collections . ResultError ( fr . gouv . vitam . common . database . builder . request . configuration . BuilderToken . ... | org . junit . Assert . assertEquals ( 1 , resultError . getCurrentIds ( ) . size ( ) ) |
testMonitoringInfosArePopulatedForABeamCounter ( ) { org . apache . beam . runners . core . metrics . MetricsContainerImpl testObject = new org . apache . beam . runners . core . metrics . MetricsContainerImpl ( "step1" ) ; java . util . HashMap < java . lang . String , java . lang . String > labels = new java . util .... | org . junit . Assert . assertThat ( actualMonitoringInfos , containsInAnyOrder ( builder1 . build ( ) ) ) |
nextShouldIncrementPorts ( ) { final int startPort = 10 ; final int portCount = 101 ; final redis . embedded . ports . SequencePortProvider provider = new redis . embedded . ports . SequencePortProvider ( startPort ) ; int max = 0 ; for ( int i = 0 ; i < portCount ; i ++ ) { int port = provider . next ( ) ; if ( port >... | org . junit . Assert . assertEquals ( ( ( portCount + startPort ) - 1 ) , max ) |
testStaticListType ( ) { com . adobe . cq . wcm . core . components . models . List list = getListUnderTest ( com . adobe . cq . wcm . core . components . internal . models . v1 . ListImplTest . LIST_2 ) ; "<AssertPlaceHolder>" ; com . adobe . cq . wcm . core . components . Utils . testJSONExport ( list , com . adobe .... | org . junit . Assert . assertEquals ( 2 , list . getItems ( ) . size ( ) ) |
testHashCode ( ) { org . drugis . addis . entities . Drug d1 = new org . drugis . addis . entities . Drug ( "Paroxetine" , "atc" ) ; org . drugis . addis . entities . Drug d2 = new org . drugis . addis . entities . Drug ( "Paroxetine" , "atc" ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { return new org . apache . common... | org . junit . Assert . assertEquals ( d1 . hashCode ( ) , d2 . hashCode ( ) ) |
testUpdateTableFail1 ( ) { org . mockito . Mockito . doAnswer ( ( ( org . mockito . stubbing . Answer < java . lang . Void > ) ( ( invocation ) -> { final RpcResult < List < org . opendaylight . yang . gen . v1 . urn . opendaylight . openflow . protocol . rev130731 . MultipartReply > > rpcResult = org . opendaylight . ... | org . junit . Assert . assertNotNull ( rpcResultFuture ) |
testMinWithInvalidRange2 ( ) { org . apache . hadoop . hbase . client . coprocessor . AggregationClient aClient = new org . apache . hadoop . hbase . client . coprocessor . AggregationClient ( org . apache . hadoop . hbase . coprocessor . TestAggregateProtocol . conf ) ; org . apache . hadoop . hbase . client . Scan sc... | org . junit . Assert . assertEquals ( null , min ) |
testDisabledWAL ( ) { org . apache . hadoop . hbase . wal . TestDisabledWAL . LOG . info ( ( "Writing<sp>data<sp>to<sp>table<sp>" + ( tableName ) ) ) ; org . apache . hadoop . hbase . client . Put p = new org . apache . hadoop . hbase . client . Put ( org . apache . hadoop . hbase . util . Bytes . toBytes ( "row" ) ) ;... | org . junit . Assert . assertNotNull ( result . getValue ( fam , org . apache . hadoop . hbase . util . Bytes . toBytes ( "qual" ) ) ) |
shouldHaveASignOfZero ( ) { com . wesabe . api . util . money . Money zeroDollars = new com . wesabe . api . util . money . Money ( decimal ( "0.00" ) , USD ) ; "<AssertPlaceHolder>" ; } signum ( ) { return amount . signum ( ) ; } | org . junit . Assert . assertEquals ( 0 , zeroDollars . signum ( ) ) |
getNumberValueFromJsonObject_input_key_null ( ) { java . lang . String jsonString = "{\"deviceId\":\"xxx-device\",\"generationId\":\"111111111111111111\",\"etag\":\"MA==\",\"connectionState\":\"Disconnected\",\"status\":\"Disabled\",\"statusReason\":null,\"connectionStateUpdatedTime\":\"0001-01-01T00:00:00\",\"statusUp... | org . junit . Assert . assertEquals ( expResult , result ) |
getLabel ( ) { org . phenotips . translation . TranslationManager tm = this . mocker . getInstance ( org . phenotips . translation . TranslationManager . class ) ; when ( tm . translate ( "phenotips.permissions.visibility.public.label" ) ) . thenReturn ( "Public" ) ; "<AssertPlaceHolder>" ; } getLabel ( ) { org . pheno... | org . junit . Assert . assertEquals ( "Public" , this . mocker . getComponentUnderTest ( ) . getLabel ( ) ) |
testSimpleWithDecimalsTrunc ( ) { org . apache . commons . math . linear . ArrayRealVector c = new org . apache . commons . math . linear . ArrayRealVector ( new double [ ] { 1.2323 , 1.4343 , 1.6333 } ) ; java . lang . String expected = ( ( ( ( ( "{1" + ( getDecimalCharacter ( ) ) ) + "23;<sp>1" ) + ( getDecimalCharac... | org . junit . Assert . assertEquals ( expected , actual ) |
nextDown3 ( ) { org . diirt . graphene . TimeScales . TimePeriod period = org . diirt . graphene . TimeScales . nextDown ( new org . diirt . graphene . TimeScales . TimePeriod ( SECOND , 5 ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertThat ( period , equalTo ( new org . diirt . graphene . TimeScales . TimePeriod ( SECOND , 2 ) ) ) |
selectorWithoutIndicatorsPattern ( ) { final java . lang . String expectedValue = "This<sp>is<sp>the<sp>expected<sp>value" ; final org . marc4j . marc . Record record = newRecord ( eu . aliada . rdfizer . pipeline . format . marc . selector . binary . A_VARIABLE_FIELD_NAME , '#' , '#' , 'a' , expectedValue ) ; final eu... | org . junit . Assert . assertEquals ( expectedValue , expression . evaluate ( record ) ) |
whenLog2IntegerValues_shouldLog2ThemAndReturnTheResultForCeilingRounding ( ) { int result = com . google . common . math . IntMath . log2 ( 30 , RoundingMode . CEILING ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 5 , result ) |
testRun_NullName_Help ( ) { when ( mockCli . commandName ( ) ) . thenReturn ( null ) ; io . bootique . command . Command mockHelp = io . bootique . run . DefaultRunnerTest . mockCommand ( "h1" , io . bootique . command . CommandOutcome . succeeded ( ) ) ; io . bootique . command . Command mockC1 = io . bootique . run .... | org . junit . Assert . assertTrue ( result . isSuccess ( ) ) |
testMax ( ) { boolean expResult = true ; javax . xml . xpath . XPathExpression expr = xpath . compile ( "//xs:element[@name='maxField']//xs:maxInclusive/@value<sp>=<sp>3" ) ; boolean result = ( ( java . lang . Boolean ) ( expr . evaluate ( schemaDocument , XPathConstants . BOOLEAN ) ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( expResult , result ) |
testCommandNestedCommandFailure ( ) { mHelper . registerEventListener ( mActivity , mActivity ) ; final org . scribe . model . OAuthRequest mockedRequest = mock ( org . scribe . model . OAuthRequest . class ) ; com . whiterabbit . postman . NestedRestRequest s = new com . whiterabbit . postman . NestedRestRequest ( moc... | org . junit . Assert . assertTrue ( mActivity . isIsFailure ( ) ) |
testExecuteGroupSubscribed ( ) { sut = new org . eurekastreams . server . persistence . mappers . db . notification . GetStreamActivitySubscriptionDbMapper ( org . eurekastreams . server . domain . EntityType . GROUP ) ; ( ( org . eurekastreams . server . persistence . mappers . BaseDomainMapper ) ( sut ) ) . setEntity... | org . junit . Assert . assertTrue ( sut . execute ( request ) ) |
testInsertRetrieveInteger ( ) { org . mongojack . mock . MockObject object = new org . mongojack . mock . MockObject ( ) ; object . integer = 10 ; coll . insert ( object ) ; org . mongojack . mock . MockObject result = coll . findOne ( ) ; "<AssertPlaceHolder>" ; } findOne ( ) { return findOne ( new org . bson . Docume... | org . junit . Assert . assertEquals ( object . integer , result . integer ) |
testClassDefaultNull ( ) { org . skife . config . TestDefaultsPresent . EmptyClassDefaultNull ec = cof . build ( org . skife . config . TestDefaultsPresent . EmptyClassDefaultNull . class ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; } | org . junit . Assert . assertNull ( ec . getValue ( ) ) |
lastModificationTimeDelete ( ) { mFsMaster . createDirectory ( new alluxio . AlluxioURI ( "/testFolder" ) , alluxio . master . file . contexts . CreateDirectoryContext . defaults ( ) ) ; mFsMaster . createFile ( new alluxio . AlluxioURI ( "/testFolder/testFile" ) , alluxio . master . file . contexts . CreateFileContext... | org . junit . Assert . assertTrue ( ( modificationTimeBeforeDelete < modificationTimeAfterDelete ) ) |
getAllFromContainerTest ( ) { java . util . List < org . openstack4j . model . storage . object . SwiftContainer > list = new java . util . ArrayList ( ) ; list . add ( mockOsContainer ) ; doReturn ( list ) . when ( containerService ) . list ( ) ; when ( endpoint . getOperation ( ) ) . thenReturn ( OpenstackConstants .... | org . junit . Assert . assertEquals ( mockOsContainer , msg . getBody ( java . util . List . class ) . get ( 0 ) ) |
isHoldingRequest ( ) { final long timeLapseRegularRequest = getRequestLapseWithNoHold ( ) ; final long timeLapseRequestWithHold = getRequestLapseWithHold ( ) ; final long regularRequestWithHoldTime = timeLapseRegularRequest + ( test . com . uaihebert . uaimockserver . validation . HoldTheRequestTest . MIN_TIME_WAITING ... | org . junit . Assert . assertTrue ( expected , ( timeLapseRequestWithHold >= regularRequestWithHoldTime ) ) |
test ( ) { final com . querydsl . core . types . MappingProjection < com . querydsl . collections . MappingProjectionTest . ResultPart > key = new com . querydsl . core . types . MappingProjection < com . querydsl . collections . MappingProjectionTest . ResultPart > ( com . querydsl . collections . MappingProjectionTes... | org . junit . Assert . assertEquals ( cats . size ( ) , list . size ( ) ) |
bestaandeLandGebied_2165_niet ( ) { final nl . bzk . brp . bijhouding . bericht . model . RelatieGroepElement relatie = new nl . bzk . brp . bijhouding . bericht . model . RelatieGroepElement ( nl . bzk . brp . bijhouding . bericht . model . RelatieGroepElementTest . ATTRIBUTEN , null , null , null , null , new nl . bz... | org . junit . Assert . assertEquals ( 0 , relatie . valideerInhoud ( ) . size ( ) ) |
testGetName ( ) { org . owasp . dependencycheck . analyzer . VersionFilterAnalyzer instance = new org . owasp . dependencycheck . analyzer . VersionFilterAnalyzer ( ) ; java . lang . String expResult = "Version<sp>Filter<sp>Analyzer" ; java . lang . String result = instance . getName ( ) ; "<AssertPlaceHolder>" ; } get... | org . junit . Assert . assertEquals ( expResult , result ) |
testSubResource ( ) { final com . sebastian_daschner . jaxrs_analyzer . analysis . results . Resources expectedResult = new com . sebastian_daschner . jaxrs_analyzer . analysis . results . Resources ( ) ; expectedResult . setBasePath ( "path" ) ; final com . sebastian_daschner . jaxrs_analyzer . analysis . results . Re... | org . junit . Assert . assertEquals ( expectedResult , actualResult ) |
whenCalculateFactorialOfZeroThenResultOne ( ) { vkaretko . Task_4_2 . Factorial factorial = new vkaretko . Task_4_2 . Factorial ( 0 ) ; "<AssertPlaceHolder>" ; } calculate ( ) { long result = 1 ; if ( ( this . n ) >= 0 ) { for ( int i = 1 ; i <= ( this . n ) ; i ++ ) { result *= i ; } } else { System . out . println ( ... | org . junit . Assert . assertThat ( factorial . calculate ( ) , org . hamcrest . core . Is . is ( 1L ) ) |
testUniqueIdValues ( ) { java . util . List < java . lang . Short > retrievedIdValues = new java . util . ArrayList < java . lang . Short > ( ) ; for ( eu . bitwalker . useragentutils . Application application : eu . bitwalker . useragentutils . Application . values ( ) ) { "<AssertPlaceHolder>" ; retrievedIdValues . a... | org . junit . Assert . assertTrue ( ( ! ( retrievedIdValues . contains ( application . getId ( ) ) ) ) ) |
shouldAddObjectInNestedObjectArrayObjectColumn ( ) { org . springframework . data . crate . core . mapping . schema . Column objectColOne = createColumn ( "map" , java . util . Map . class , null , false ) ; org . springframework . data . crate . core . mapping . schema . Column objectColTwo = createColumn ( "longs" , ... | org . junit . Assert . assertThat ( statement . createStatement ( ) , org . hamcrest . Matchers . is ( sql . toString ( ) ) ) |
equalHashCodes ( ) { final java . lang . String groupId = "groupId" ; final java . lang . String artifactId = "artifactId" ; final org . jboss . shrinkwrap . resolver . api . maven . coordinate . MavenDependencyExclusion exclusion1 = new org . jboss . shrinkwrap . resolver . api . maven . coordinate . MavenDependencyEx... | org . junit . Assert . assertTrue ( ( ( exclusion1 . hashCode ( ) ) == ( exclusion2 . hashCode ( ) ) ) ) |
filter_A$Function1 ( ) { com . m3 . scalaflavor4j . ForkJoinParSeq < java . lang . String > target = com . m3 . scalaflavor4j . ForkJoinParSeq . apply ( list ) ; com . m3 . scalaflavor4j . ParSeq < java . lang . String > actual = target . filter ( new com . m3 . scalaflavor4j . F1 < java . lang . String , java . lang .... | org . junit . Assert . assertThat ( actual . toSeq ( ) . size ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( 20 ) ) ) |
testCreationOfExceptionIsAsExpected ( ) { final com . gazbert . bxbot . trading . api . ExchangeNetworkException exception = new com . gazbert . bxbot . trading . api . ExchangeNetworkException ( com . gazbert . bxbot . trading . api . TestExchangeNetworkExceptionCreation . ERROR_MSG ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( com . gazbert . bxbot . trading . api . TestExchangeNetworkExceptionCreation . ERROR_MSG , exception . getMessage ( ) ) |
testIsDeleteRefAction ( ) { classUnderTest . setDeleteRefAction ( true ) ; "<AssertPlaceHolder>" ; } isDeleteRefAction ( ) { return deleteRefAction ; } | org . junit . Assert . assertEquals ( true , classUnderTest . isDeleteRefAction ( ) ) |
testOutsideFollowedByOutside ( ) { java . lang . String outcome = opennlp . tools . namefind . BilouNameFinderSequenceValidatorTest . OTHER ; java . lang . String [ ] inputSequence = new java . lang . String [ ] { "something" , "something" , "something" } ; java . lang . String [ ] outcomesSequence = new java . lang . ... | org . junit . Assert . assertTrue ( opennlp . tools . namefind . BilouNameFinderSequenceValidatorTest . validator . validSequence ( 1 , inputSequence , outcomesSequence , outcome ) ) |
testGetSwitchPortsForInvalidSwitchId ( ) { com . vmware . vrack . hms . node . switches . SwitchNodeConnectorTest . logger . info ( "[TS]<sp>:<sp>testGetSwitchPortsForInvalidSwitchId" ) ; java . lang . String switchId = "S99" ; com . vmware . vrack . hms . node . switches . SwitchNodeConnectorTest . logger . info ( "[T... | org . junit . Assert . assertTrue ( result . isEmpty ( ) ) |
equalsConsistentTest ( ) { System . out . print ( "-><sp>Consistent<sp>equals<sp>-<sp>" ) ; final ua . com . alexcoffee . model . photo . Photo photo1 = ua . com . alexcoffee . model . photo . Photo . getBuilder ( ) . build ( ) ; photo1 . setTitle ( "Photo" ) ; photo1 . setSmallUrl ( "link1" ) ; photo1 . setLongUrl ( "... | org . junit . Assert . assertTrue ( photo1 . equals ( photo2 ) ) |
testVergelijkDatumEindeGeldigheid1Leeg ( ) { final nl . bzk . brp . service . maakbericht . algemeen . MaakBerichtParameters maakBerichtParameters = new nl . bzk . brp . service . maakbericht . algemeen . MaakBerichtParameters ( ) ; final nl . bzk . brp . service . maakbericht . algemeen . MaakBerichtPersoonInformatie ... | org . junit . Assert . assertEquals ( ( - 1 ) , compare ) |
testGetRolesWithEmptyAuthorities ( ) { java . util . List < java . lang . String > expected = java . util . Collections . emptyList ( ) ; java . util . Collection < org . springframework . security . core . GrantedAuthority > authorities = java . util . Collections . emptyList ( ) ; when ( context . getAuthentication (... | org . junit . Assert . assertEquals ( expected , actual ) |
testFastIndexRecompute ( ) { final com . persistit . Buffer b1 = getABuffer ( ) ; try { b1 . init ( Buffer . PAGE_TYPE_DATA ) ; final com . persistit . Key key = new com . persistit . Key ( _persistit ) ; final com . persistit . Value value = new com . persistit . Value ( _persistit ) ; final com . persistit . ValueHel... | org . junit . Assert . assertEquals ( inserteds , computeds ) |
testReadWrite ( ) { org . nd4j . linalg . api . ndarray . INDArray write = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 4 , 4 ) ; org . nd4j . linalg . jcublas . buffer . ByteArrayOutputStream bos = new org . nd4j . linalg . jcublas . buffer . ByteArrayOutputStream ( ) ; org . nd4j . linalg . jcublas . buffer ... | org . junit . Assert . assertEquals ( write , read ) |
testGetUrl ( ) { System . out . println ( "getUrl" ) ; java . lang . String id = "" ; eu . impact_project . wsclient . ServiceProvider instance = new eu . impact_project . wsclient . ServiceProviderTest . ServiceProviderImpl ( ) ; java . net . URL expResult = null ; java . net . URL result = instance . getUrl ( id ) ; ... | org . junit . Assert . assertEquals ( expResult , result ) |
testGetReply ( ) { org . sagebionetworks . repo . model . discussion . Forum dto = servletTestHelper . getForumByProjectId ( dispatchServlet , project . getId ( ) , adminUserId ) ; createThread . setForumId ( dto . getId ( ) ) ; org . sagebionetworks . repo . model . discussion . DiscussionThreadBundle threadBundle = s... | org . junit . Assert . assertEquals ( replyBundle , servletTestHelper . getReply ( dispatchServlet , adminUserId , replyBundle . getId ( ) ) ) |
createStringShouldAllowNoParametersSupplied ( ) { "<AssertPlaceHolder>" ; } createString ( java . lang . String , java . lang . Object [ ] ) { org . modeshape . common . util . CheckArg . isNotNull ( pattern , "pattern" ) ; if ( parameters == null ) parameters = org . modeshape . common . util . StringUtil . EMPTY_STRI... | org . junit . Assert . assertThat ( org . modeshape . common . util . StringUtil . createString ( "test" , ( ( java . lang . Object [ ] ) ( null ) ) ) , org . hamcrest . core . Is . is ( "test" ) ) |
testComposition2 ( ) { com . github . davidmoten . rx . jdbc . DatabaseTestBase . log . debug ( "running<sp>testComposition2" ) ; rx . functions . Func1 < java . lang . Integer , java . lang . Boolean > isZero = new rx . functions . Func1 < java . lang . Integer , java . lang . Boolean > ( ) { @ com . github . davidmot... | org . junit . Assert . assertEquals ( 0 , counts . size ( ) ) |
testUpdatePrimaryIndexKeyOfResourceId ( ) { insertKeys ( getHive ( ) ) ; org . hivedb . meta . directory . Directory d = getDirectory ( ) ; java . lang . String firstKey = org . hivedb . util . functional . Atom . getFirst ( getPrimaryIndexOrResourceKeys ( ) ) ; for ( java . lang . String key : getPrimaryIndexOrResourc... | org . junit . Assert . assertEquals ( firstKey , d . getPrimaryIndexKeyOfResourceId ( resource , key ) . toString ( ) ) |
testIsInfoEnabled ( ) { org . apache . commons . logging . Log mockLog = mock ( org . apache . commons . logging . Log . class ) ; when ( mockLog . isInfoEnabled ( ) ) . thenReturn ( true ) ; io . netty . util . internal . logging . InternalLogger logger = new io . netty . util . internal . logging . CommonsLogger ( mo... | org . junit . Assert . assertTrue ( logger . isInfoEnabled ( ) ) |
testHaalPersoonCacheOp ( ) { final nl . bzk . algemeenbrp . dal . domein . brp . entity . PersoonCache cache = persoonCacheJpaRepository . haalPersoonCacheOp ( 1 ) ; "<AssertPlaceHolder>" ; } haalPersoonCacheOp ( java . lang . Integer ) { final java . util . List < nl . bzk . brp . model . operationeel . kern . Persoon... | org . junit . Assert . assertNotNull ( cache ) |
testJUnitHamcrestMatcherFailureWorks ( ) { try { "<AssertPlaceHolder>" ; } catch ( java . lang . NoSuchMethodError e ) { org . junit . Assert . fail ( ( ( "Class<sp>search<sp>path<sp>seems<sp>broken<sp>re<sp>new<sp>JUnit<sp>and<sp>old<sp>Hamcrest." + "<sp>Got<sp>NoSuchMethodError;<sp>e:<sp>" ) + e ) ) ; } catch ( java ... | org . junit . Assert . assertThat ( 1 , org . hamcrest . CoreMatchers . equalTo ( 2 ) ) |
testBuildWithParametersAndDisabledDefaultCOnstaintsWithOrderBy ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; java . lang . String abbrName = "AN" ; java . lang . String name = "fsdfds" ; org . lnu . is . domain . contact . type . ContactType context = new org . lnu . is . domain . contact . type . C... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
testGetEntityManager ( ) { javax . persistence . EntityManager em = emf . createEntityManager ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( em ) |
extract_AddAfterUsageEndWithRole ( ) { createUsageLicenseHistory ( ModificationType . ADD , org . oscm . test . DateTimeHandling . calculateDate ( "2013-05-01<sp>00:00:01" ) , org . oscm . billingservice . business . calculation . revenue . UserAssignmentExtractorTest . USER_KEY , org . oscm . billingservice . business... | org . junit . Assert . assertEquals ( 0 , userKeySet . size ( ) ) |
encodeDecodeMapIp ( ) { java . util . Map < java . lang . String , java . lang . Object > m = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; java . net . InetAddress local = java . net . Inet4Address . getByAddress ( new byte [ ] { 127 , 0 , 0 , 1 } ) ; m . put ( "ip" , local ) ; java .... | org . junit . Assert . assertEquals ( local , dm . get ( "ip" ) ) |
testAddBlock ( ) { org . ds . chronos . metrics . MetricStore store = new org . ds . chronos . metrics . MetricStore ( chronicle ) ; java . util . List < org . ds . chronos . metrics . Metric > metrics = new java . util . ArrayList < org . ds . chronos . metrics . Metric > ( ) ; for ( int i = 0 ; i < 128 ; i ++ ) { met... | org . junit . Assert . assertEquals ( 128 , chronicle . getNumEvents ( 0 , java . lang . System . currentTimeMillis ( ) ) ) |
testCacheEntryWithVaryStarHasVariants ( ) { final org . apache . hc . core5 . http . Header [ ] headers = new org . apache . hc . core5 . http . Header [ ] { new org . apache . hc . core5 . http . message . BasicHeader ( "Vary" , "*" ) } ; entry = makeEntry ( headers ) ; "<AssertPlaceHolder>" ; } hasVariants ( ) { retu... | org . junit . Assert . assertTrue ( entry . hasVariants ( ) ) |
testCopyDynAny ( ) { java . lang . String msg ; java . math . BigDecimal fixedVal ; org . omg . CORBA . TypeCode tc = null ; org . omg . DynamicAny . DynFixed dynAny = null ; org . omg . DynamicAny . DynFixed dynAny2 = null ; fixedVal = new java . math . BigDecimal ( "1.0" ) ; tc = orb . create_fixed_tc ( ( ( short ) (... | org . junit . Assert . assertTrue ( msg , dynAny . equal ( dynAny2 ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.