input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testNext ( ) { java . lang . Object value = "testObject" ; when ( nativeResultSet . getObject ( anyInt ( ) ) ) . thenReturn ( value ) ; when ( nativeResultSet . next ( ) ) . thenReturn ( true ) ; org . pentaho . platform . plugin . services . connections . sql . SQLResultSet resultSet = new org . pentaho . platform . p... | org . junit . Assert . assertEquals ( value , objects [ i ] ) |
testGetNotExist ( ) { jp . primecloud . auto . zabbix . model . host . HostGetParam param = new jp . primecloud . auto . zabbix . model . host . HostGetParam ( ) ; param . setHostids ( java . util . Arrays . asList ( "999999" ) ) ; param . setOutput ( "extend" ) ; param . setSelectGroups ( "extend" ) ; param . setSelec... | org . junit . Assert . assertEquals ( 0 , hosts . size ( ) ) |
testEquals ( ) { gov . uspto . patent . model . classification . CpcClassification cpc1 = new gov . uspto . patent . model . classification . CpcClassification ( ) ; cpc1 . parseText ( "D07B2201" ) ; gov . uspto . patent . model . classification . CpcClassification cpc2 = new gov . uspto . patent . model . classificati... | org . junit . Assert . assertEquals ( cpc1 , cpc2 ) |
testCalculatePreviosStartIndex_FirstPageStartIndexLessThanCount ( ) { int nextStartIndex = org . deegree . services . wfs . util . ResponsePagingUtils . calculatePreviousStartIndex ( 5 , 10 ) ; "<AssertPlaceHolder>" ; } calculatePreviousStartIndex ( int , int ) { int previousStartIndex = startIndex - count ; if ( ( pre... | org . junit . Assert . assertThat ( nextStartIndex , org . hamcrest . CoreMatchers . is ( 0 ) ) |
test_CaptureEnPassantRightFalse ( ) { classUnderTest = addBlackPawn ( GenericPosition . e4 ) ; pl . add ( new eubos . board . pieces . Knight ( eubos . board . pieces . Piece . Colour . white , GenericPosition . d2 ) ) ; pm = new eubos . position . PositionManager ( new eubos . board . Board ( pl ) , eubos . board . pi... | org . junit . Assert . assertFalse ( ml . contains ( expectedMove ) ) |
testGetTables ( ) { com . ebay . pulsar . analytics . datasource . DataSourceProvider provider = org . mockito . Mockito . mock ( com . ebay . pulsar . analytics . datasource . DataSourceProvider . class ) ; java . util . List < com . ebay . pulsar . analytics . datasource . Table > tables = com . google . common . col... | org . junit . Assert . assertEquals ( com . google . common . collect . Lists . newArrayList ( "T1" ) , ts ) |
testDisconnectedClient ( ) { it . polimi . deib . provaFinale2014 . andrea . celli_stefano1 . cereda . server . DisconnectedClient dc = new it . polimi . deib . provaFinale2014 . andrea . celli_stefano1 . cereda . server . DisconnectedClient ( 1 , null , null ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( dc ) |
construct_withNullArgName ( ) { final net . sf . qualitycheck . exception . IllegalNullElementsException e = new net . sf . qualitycheck . exception . IllegalNullElementsException ( ( ( java . lang . String ) ( null ) ) ) ; final java . lang . String expected = IllegalNullElementsException . DEFAULT_MESSAGE ; "<AssertP... | org . junit . Assert . assertEquals ( expected , e . getMessage ( ) ) |
testWriteIntMatrixCols ( ) { int [ ] [ ] matrix = new int [ ] [ ] { new int [ ] { 1 , 2 , 3 } , new int [ ] { 4 , 5 , 6 } , new int [ ] { 7 , 8 , 9 } } ; int rows = matrix . length ; int columns = matrix [ 0 ] . length ; java . io . File tmp = java . io . File . createTempFile ( "LDAUtilsTest" , ".bin" ) ; int iteratio... | org . junit . Assert . assertEquals ( matrix [ to ] [ colIndeces [ ty ] ] , readInt ) |
test52createXGroupUserFromMap ( ) { setup ( ) ; org . apache . ranger . view . VXGroup vxGroup = vxGroup ( ) ; org . apache . ranger . view . VXUser vxUser = vxUser ( ) ; java . util . List < org . apache . ranger . view . VXUser > vXUserList = new java . util . ArrayList < org . apache . ranger . view . VXUser > ( ) ;... | org . junit . Assert . assertNotNull ( vxGUInfoObj ) |
testAllowInputModification ( ) { org . deeplearning4j . nn . graph . ComputationGraphConfiguration conf = new org . deeplearning4j . nn . graph . NeuralNetConfiguration . Builder ( ) . graphBuilder ( ) . addInputs ( "in1" , "in2" ) . layer ( "0" , new org . deeplearning4j . nn . graph . DenseLayer . Builder ( ) . nOut ... | org . junit . Assert . assertEquals ( s , exp . get ( s ) , allowed ) |
testDynamicQueryByPrimaryKeyMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . portal . kernel . model . OrgLabor . class , _dynamicQueryClassLoader ) ; dynamicQuery . add ( com . life... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
testBasicPathMatch7 ( ) { org . apache . ogt . http . impl . cookie . BasicClientCookie cookie = new org . apache . ogt . http . impl . cookie . BasicClientCookie ( "name" , "value" ) ; org . apache . ogt . http . cookie . CookieOrigin origin = new org . apache . ogt . http . cookie . CookieOrigin ( "somehost" , 80 , "... | org . junit . Assert . assertTrue ( h . match ( cookie , origin ) ) |
shouldReturnTrueWhenSelfLooped ( ) { final org . openkilda . model . SwitchId switchId = new org . openkilda . model . SwitchId ( "00:00:00:00:00:00:00:01" ) ; org . openkilda . messaging . info . event . PathNode source = new org . openkilda . messaging . info . event . PathNode ( switchId , 1 , 0 ) ; org . openkilda ... | org . junit . Assert . assertTrue ( isl . isSelfLooped ( ) ) |
testAddObjectIdFilter ( ) { connection = createConnection ( TestConfig . serverEndpoint , TestConfig . port ) ; connection . connect ( ) ; connection . login ( "userc" , "1" , "voxeo" ) ; com . voxeo . rayo . client . xmpp . stanza . IQ iq = new com . voxeo . rayo . client . xmpp . stanza . IQ ( IQ . Type . set ) . set... | org . junit . Assert . assertNotNull ( filter . poll ( ) ) |
testWithExceptionLocal ( ) { java . lang . String message = "Test<sp>failure" ; this . service . setFailException ( new java . lang . RuntimeException ( message ) ) ; try { this . doSimpleTest ( false ) ; org . junit . Assert . fail ( "Expected<sp>to<sp>fail" ) ; } catch ( java . lang . RuntimeException e ) { "<AssertP... | org . junit . Assert . assertEquals ( message , e . getMessage ( ) ) |
saveEncounter_shouldSaveEncounterWithComplexObs ( ) { executeDataSet ( org . openmrs . api . EncounterServiceTest . ENC_OBS_HIERARCHY_DATA_XML ) ; org . openmrs . api . EncounterService es = org . openmrs . api . context . Context . getEncounterService ( ) ; org . openmrs . Encounter encounter = es . getEncounter ( 101... | org . junit . Assert . assertEquals ( 2 , encounter . getObsAtTopLevel ( true ) . size ( ) ) |
generateSecureServerNameWithAccountIdAndLoadBalancerIdShouldCreateExpectedName ( ) { java . lang . String expectedName = ( ( ( loadBalancer . getAccountId ( ) ) + "_" ) + ( loadBalancer . getId ( ) ) ) + "_S" ; java . lang . String generatedName = org . openstack . atlas . adapter . helpers . ZxtmNameBuilder . genSslVS... | org . junit . Assert . assertEquals ( expectedName , generatedName ) |
order_04_shouldGenerateDailyDigestOneMessage ( ) { log . debug ( "In<sp>shouldGenerateDailyDigestOneMessage" ) ; mockAuthenticationOnUserService ( fr . ippon . tatami . service . MailDigestServiceTest . DAILY_DIGEST_USER ) ; userService . updateDailyDigestRegistration ( true ) ; mockAuthenticationOnFriendshipService ( ... | org . junit . Assert . assertThat ( ( ( statuses . getValue ( ) . size ( ) ) == 1 ) , org . hamcrest . CoreMatchers . is ( true ) ) |
testDecryptWithNoEncryptedProperties ( ) { java . util . Dictionary dsProps = new java . util . Hashtable ( ) ; dsProps . put ( "dataSourceName" , "testDS" ) ; dsProps . put ( "timeout" , 2000 ) ; org . ops4j . pax . jdbc . config . impl . Decryptor decryptor = new org . ops4j . pax . jdbc . config . impl . Decryptor (... | org . junit . Assert . assertEquals ( expectedValue , actualValue ) |
testEqualsAndHashCode ( ) { org . jboss . forge . furnace . proxy . test . Bean bean1 = new org . jboss . forge . furnace . proxy . test . Bean ( ) ; java . lang . String attributeValue = "String" ; bean1 . setAtt ( attributeValue ) ; org . jboss . forge . furnace . proxy . test . Bean enhancedObj = org . jboss . forge... | org . junit . Assert . assertTrue ( enhancedObj . equals ( bean2 ) ) |
testDuplicateLocalVariableMVELConsequence ( ) { final org . kie . internal . builder . KnowledgeBuilder kbuilder = org . kie . internal . builder . KnowledgeBuilderFactory . newKnowledgeBuilder ( ) ; kbuilder . add ( org . kie . internal . io . ResourceFactory . newInputStreamResource ( getClass ( ) . getResourceAsStre... | org . junit . Assert . assertTrue ( kbuilder . hasErrors ( ) ) |
testToJson ( ) { io . vertx . ext . mongo . UpdateOptions options = new io . vertx . ext . mongo . UpdateOptions ( ) ; io . vertx . ext . mongo . WriteOption . WriteOption writeOption = MAJORITY ; boolean multi = io . vertx . test . core . TestUtils . randomBoolean ( ) ; boolean upsert = io . vertx . test . core . Test... | org . junit . Assert . assertEquals ( options , new io . vertx . ext . mongo . UpdateOptions ( options . toJson ( ) ) ) |
testOnlyHigh ( ) { tillerino . tillerinobot . RateLimiter limiter = new tillerino . tillerinobot . RateLimiter ( ) ; java . util . concurrent . atomic . AtomicInteger high = new java . util . concurrent . atomic . AtomicInteger ( ) ; java . util . concurrent . atomic . AtomicInteger low = new java . util . concurrent .... | org . junit . Assert . assertEquals ( 100 , high . get ( ) ) |
whenLockNotHeldCheckReturnsFalse ( ) { com . mongodb . client . MongoDatabase db = new com . github . fakemongo . Fongo ( com . github . mongobee . dao . LockDaoTest . TEST_SERVER ) . getDatabase ( com . github . mongobee . dao . LockDaoTest . DB_NAME ) ; com . github . mongobee . dao . LockDao dao = new com . github .... | org . junit . Assert . assertFalse ( dao . isLockHeld ( db ) ) |
empty ( ) { "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { if ( input != null ) { java . util . Map < java . lang . String , java . lang . String > matches = new java . util . HashMap ( ) ; java . util . regex . Matcher matcher = org . jboss . gwt . elemento . processor . ExpressionParser . PATTERN . matche... | org . junit . Assert . assertTrue ( parser . parse ( "" ) . isEmpty ( ) ) |
testFromEbXMLNull ( ) { org . openehealth . ipf . commons . ihe . xds . core . requests . query . FindDocumentsQuery result = new org . openehealth . ipf . commons . ihe . xds . core . requests . query . FindDocumentsQuery ( ) ; transformer . fromEbXML ( result , null ) ; "<AssertPlaceHolder>" ; } fromEbXML ( org . ope... | org . junit . Assert . assertEquals ( new org . openehealth . ipf . commons . ihe . xds . core . requests . query . FindDocumentsQuery ( ) , result ) |
contentsEqual ( ) { parser . Terminal t = new parser . Terminal ( "test" , null ) ; parser . Terminal [ ] t1 = new parser . Terminal [ ] { t } ; parser . Terminal [ ] t2 = new parser . Terminal [ ] { t } ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ! ( o instanceof parser . Item ) ) return false ;... | org . junit . Assert . assertFalse ( t1 . equals ( t2 ) ) |
testGetLocalIPString ( ) { "<AssertPlaceHolder>" ; } getLocalIPString ( ) { final java . net . InetAddress addr = com . cloud . utils . net . NetUtils . getLocalInetAddress ( ) ; if ( addr != null ) { return addr . getHostAddress ( ) ; } return "127.0.0.1" ; } | org . junit . Assert . assertNotNull ( com . cloud . utils . net . NetUtils . getLocalIPString ( ) ) |
forEachWithIndexWithChainedValues ( ) { org . eclipse . collections . impl . map . mutable . UnifiedMap < org . eclipse . collections . impl . CollidingInt , java . lang . String > map = org . eclipse . collections . impl . map . mutable . UnifiedMap . newMap ( ) ; int size = 100000 ; for ( int i = 0 ; i < size ; i ++ ... | org . junit . Assert . assertEquals ( index , ( ( intArray [ 0 ] ) + 1 ) ) |
testDisjointClassInconsistency ( ) { manager . addAxiom ( ontology , DisjointClasses ( c1 , c2 ) ) ; startReasoner ( ) ; boolean consistent = reasoner . isConsistent ( ) ; "<AssertPlaceHolder>" ; manager . removeAxiom ( ontology , DisjointClasses ( c1 , c2 ) ) ; } isConsistent ( ) { return true ; } | org . junit . Assert . assertFalse ( consistent ) |
testCompareWorkflowRunFiles_Smaller ( ) { net . sourceforge . seqware . pipeline . deciders . BasicDeciderTest . TestingDecider decider = ( ( net . sourceforge . seqware . pipeline . deciders . BasicDeciderTest . TestingDecider ) ( instance ) ) ; decider . setMetaws ( ( ( net . sourceforge . seqware . common . metadata... | org . junit . Assert . assertTrue ( ( ( ( ( net . sourceforge . seqware . pipeline . deciders . BasicDecider ) ( instance ) ) . compareWorkflowRunFiles ( inputFiles , filesToRun ) ) == ( BasicDecider . FILE_STATUS . PAST_SUPERSET ) ) ) |
testToString ( ) { java . lang . String result = fixture . toString ( ) ; java . lang . String left = "[declaration]<sp>sequence[" ; "<AssertPlaceHolder>" ; } toString ( ) { return fName ; } | org . junit . Assert . assertEquals ( left , result . substring ( 0 , left . length ( ) ) ) |
testViewHomeTemplate ( ) { com . ewcms . publication . freemarker . preview . PreviewService service = newPreviewService ( ) ; java . io . ByteArrayOutputStream out = new java . io . ByteArrayOutputStream ( ) ; boolean mock = false ; service . viewHomeTemplate ( out , new com . ewcms . core . site . model . Site ( ) , ... | org . junit . Assert . assertTrue ( ( ( out . size ( ) ) > 0 ) ) |
getItemsProperties ( ) { java . util . Map < java . lang . String , java . util . Map < java . lang . String , java . lang . String > > itemsProperties = elementPresenter . getSimpleItemsProperties ( ) ; "<AssertPlaceHolder>" ; } getSimpleItemsProperties ( ) { return elementViewList . stream ( ) . collect ( java . util... | org . junit . Assert . assertNotNull ( itemsProperties ) |
findElementsOneByEmpty ( ) { final org . openqa . selenium . support . pagefactory . ByAllTest . AllDriver driver = mock ( org . openqa . selenium . support . pagefactory . ByAllTest . AllDriver . class ) ; final java . util . List < org . openqa . selenium . WebElement > elems = new java . util . ArrayList < org . ope... | org . junit . Assert . assertThat ( by . findElements ( driver ) , org . hamcrest . Matchers . equalTo ( elems ) ) |
testMultipleColumnPrefixFilterWithManyFamilies ( ) { java . lang . String family1 = "Family1" ; java . lang . String family2 = "Family2" ; org . apache . hadoop . hbase . filter . HTableDescriptor htd = new org . apache . hadoop . hbase . filter . HTableDescriptor ( "TestMultipleColumnPrefixFilter" ) ; htd . addFamily ... | org . junit . Assert . assertEquals ( ( ( prefixMap . get ( "p" ) . size ( ) ) + ( prefixMap . get ( "q" ) . size ( ) ) ) , results . size ( ) ) |
testReadMismatchVersion ( ) { java . lang . String payload = "test" ; org . apache . flink . core . io . VersionedIOWriteableTest . TestWriteable testWriteable = new org . apache . flink . core . io . VersionedIOWriteableTest . TestWriteable ( 1 , payload ) ; byte [ ] serialized ; try ( org . apache . flink . core . me... | org . junit . Assert . assertEquals ( null , testWriteable . getData ( ) ) |
testSetFont ( ) { org . eclipse . swt . graphics . Font font = createFont ( ) ; gc . setFont ( font ) ; org . eclipse . swt . internal . graphics . GCOperation [ ] gcOperations = org . eclipse . swt . graphics . ControlGC_Test . getGCOperations ( gc ) ; org . eclipse . swt . internal . graphics . GCOperation . SetPrope... | org . junit . Assert . assertEquals ( font . getFontData ( ) [ 0 ] , operation . value ) |
testDeleteIdsEmpty ( ) { com . j256 . ormlite . dao . BaseDaoImpl < com . j256 . ormlite . dao . Foo , java . lang . Integer > dao = new com . j256 . ormlite . dao . BaseDaoImpl < com . j256 . ormlite . dao . Foo , java . lang . Integer > ( connectionSource , com . j256 . ormlite . dao . Foo . class ) { } ; dao . initi... | org . junit . Assert . assertEquals ( 0 , dao . deleteIds ( fooList ) ) |
serialize ( ) { com . google . gson . Gson gson = com . github . seratch . jslack . common . json . GsonFactory . createSnakeCase ( ) ; com . github . seratch . jslack . api . model . event . TeamProfileReorderEvent event = new com . github . seratch . jslack . api . model . event . TeamProfileReorderEvent ( ) ; java .... | org . junit . Assert . assertThat ( generatedJson , org . hamcrest . CoreMatchers . is ( expectedJson ) ) |
testGetUserOperationLog_Success ( ) { container . login ( "1" , org . oscm . operatorservice . bean . ROLE_PLATFORM_OPERATOR ) ; operationList . add ( "Add" ) ; callerRolles . add ( OrganizationRoleType . PLATFORM_OPERATOR ) ; byte [ ] result = operatorService . getUserOperationLog ( operationList , 100000 , 200000 ) ;... | org . junit . Assert . assertNotNull ( result ) |
testImgWithCacheControlPrivateReservedAndFetchNotTriggered ( ) { cache . addResponse ( new org . apache . shindig . gadgets . http . HttpRequest ( org . apache . shindig . common . uri . Uri . parse ( org . apache . shindig . gadgets . rewrite . CacheEnforcementVisitorTest . IMG_URL ) ) , new org . apache . shindig . g... | org . junit . Assert . assertTrue ( ( ( cache . getResponse ( new org . apache . shindig . gadgets . http . HttpRequest ( org . apache . shindig . common . uri . Uri . parse ( org . apache . shindig . gadgets . rewrite . CacheEnforcementVisitorTest . IMG_URL ) ) ) ) != null ) ) |
testBondIsAromaticT ( ) { org . openscience . cdk . isomorphism . matchers . Expr expr = new org . openscience . cdk . isomorphism . matchers . Expr ( IS_AROMATIC ) ; org . openscience . cdk . interfaces . IBond bond = mock ( org . openscience . cdk . interfaces . IBond . class ) ; when ( bond . isAromatic ( ) ) . then... | org . junit . Assert . assertTrue ( expr . matches ( bond ) ) |
testNOrFunction ( ) { items . add ( new org . eclipse . smarthome . core . library . types . ArithmeticGroupFunctionTest . TestItem ( "TestItem1" , OpenClosedType . CLOSED ) ) ; items . add ( new org . eclipse . smarthome . core . library . types . ArithmeticGroupFunctionTest . TestItem ( "TestItem2" , org . eclipse . ... | org . junit . Assert . assertEquals ( OpenClosedType . CLOSED , state ) |
subInterfaceExcludeSelf ( ) { for ( java . lang . Class < ? > type : nl . jqno . equalsverifier . internal . reflection . SuperclassIterable . of ( nl . jqno . equalsverifier . internal . reflection . SuperclassIterableTest . SimpleSubInterface . class ) ) { actual . add ( type ) ; } "<AssertPlaceHolder>" ; } of ( java... | org . junit . Assert . assertEquals ( emptyList ( ) , actual ) |
deleteAllNotes ( ) { openNotes ( ) ; java . util . List < org . openqa . selenium . WebElement > notes = com . sugarcrm . candybean . examples . mobile . EvernoteAndroidTest . iface . wd . findElements ( org . openqa . selenium . By . id ( "com.evernote:id/title" ) ) ; while ( ( notes . size ( ) ) != 0 ) { org . openqa... | org . junit . Assert . assertEquals ( com . sugarcrm . candybean . examples . mobile . EvernoteAndroidTest . iface . wd . findElements ( org . openqa . selenium . By . id ( "com.evernote:id/title" ) ) . size ( ) , 0 ) |
testPageWhichDoesAdaptWithExtension ( ) { org . apache . sling . api . resource . Resource r = provider . getResource ( resolveContext , ( ( goodMntPath ) + ".json" ) , null , null ) ; "<AssertPlaceHolder>" ; } getResource ( org . apache . sling . spi . resource . provider . ResolveContext , java . lang . String , org ... | org . junit . Assert . assertNotNull ( r ) |
testGetTimestamps ( ) { final com . xiaomi . infra . chronos . ChronosServer chronosServer = createChronosServer ( new com . xiaomi . infra . chronos . zookeeper . HostPort ( "127.0.0.1" , 2188 ) ) ; java . lang . Thread thread = new java . lang . Thread ( ) { @ com . xiaomi . infra . chronos . client . Override public... | org . junit . Assert . assertTrue ( ( ( timestamp2 - timestamp1 ) >= 100 ) ) |
testIsEmpty_WithPayload ( ) { pubMessage = new net . xenqtt . message . PubMessage ( net . xenqtt . message . QoS . AT_LEAST_ONCE , false , "my<sp>topic" , 123 , new byte [ ] { 1 , 2 , 3 } ) ; message = new net . xenqtt . client . PublishMessage ( channelManager , channel , pubMessage ) ; "<AssertPlaceHolder>" ; } isEm... | org . junit . Assert . assertFalse ( message . isEmpty ( ) ) |
runTest ( ) { boolean result = checkNoError ( "Social_Files_Add_and_Get_Community_File_Comments" ) ; "<AssertPlaceHolder>" ; } getNoErrorMsg ( ) { return noErrorMsg ; } | org . junit . Assert . assertTrue ( getNoErrorMsg ( ) , result ) |
testSyncWriteFiltered ( ) { final com . spotify . heroic . ingestion . CoreIngestionGroup group = setupIngestionGroup ( empty ( ) , empty ( ) , empty ( ) ) ; doReturn ( filter ) . when ( filterSupplier ) . get ( ) ; doReturn ( other ) . when ( async ) . failed ( any ( java . lang . Throwable . class ) ) ; doReturn ( ex... | org . junit . Assert . assertEquals ( expected , group . syncWrite ( request ) ) |
testCreateFacadesWithDelegate ( ) { org . locationtech . geowave . core . cli . prefix . JCommanderPrefixTranslator translator = new org . locationtech . geowave . core . cli . prefix . JCommanderPrefixTranslator ( ) ; translator . addObject ( new org . locationtech . geowave . core . cli . prefix . JCommanderTranslati... | org . junit . Assert . assertEquals ( 2 , map . getObjects ( ) . size ( ) ) |
isBillingDataButtonDisabled_Null ( ) { bean . setFromDate ( null ) ; bean . setToDate ( null ) ; boolean result = bean . isBillingDataButtonDisabled ( ) ; "<AssertPlaceHolder>" ; } isBillingDataButtonDisabled ( ) { java . util . Date date = new java . util . Date ( java . lang . System . currentTimeMillis ( ) ) ; bean ... | org . junit . Assert . assertTrue ( result ) |
testConstructFromSorted ( ) { java . util . TreeMap map = ch . usi . da . dmap . TreeMapTest . map5 ( ) ; java . util . TreeMap map2 = new java . util . TreeMap ( map ) ; "<AssertPlaceHolder>" ; } map5 ( ) { java . util . TreeMap map = new java . util . TreeMap ( ) ; org . junit . Assert . assertTrue ( map . isEmpty ( ... | org . junit . Assert . assertEquals ( map , map2 ) |
clusterNewConfigurationErrorTest ( ) { initData ( ) ; when ( mockScalingRuleService . getRule ( 1 ) ) . thenReturn ( rule ) ; when ( mockClusterService . getCluster ( 1 ) ) . thenReturn ( cluster ) ; when ( mockHealthMonitoringService . getClusterLoad ( machine , PeriodicAutoscalerItemProcessor . METRIC_NAMES , Periodi... | org . junit . Assert . assertNull ( job ) |
shouldMarkTransitionFromNullToRegularAdminAsValid ( ) { stubSecurityContextWithAuthentication ( ) ; stubRoleTransition ( null , com . qcadoo . security . internal . validators . ROLE_ADMIN ) ; final boolean isValid = userRoleValidationService . checkUserCreatingSuperadmin ( userDataDefMock , userEntityMock ) ; "<Assert... | org . junit . Assert . assertTrue ( isValid ) |
shouldCreateStringRepresentationOfKey ( ) { java . lang . String key1 = uniqueString ( 3 ) ; java . lang . String key2 = uniqueString ( 3 ) ; java . lang . String key3 = uniqueString ( 3 ) ; java . sql . Array array = createJdbcArray ( key1 , key2 , key3 ) ; given ( resultSet . getArray ( annis . sqlgen . PostgreSqlArr... | org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( expected ) ) |
testAvailableMessageCountInitialized ( ) { java . lang . String topic = "some:topic" ; java . util . Optional < java . lang . Long > result = channelManager . getAvailableMessageCount ( topic ) ; "<AssertPlaceHolder>" ; } getAvailableMessageCount ( java . lang . String ) { return java . util . Optional . ofNullable ( c... | org . junit . Assert . assertEquals ( java . util . Optional . empty ( ) , result ) |
randomElesTest ( ) { java . util . List < java . lang . Integer > result = cn . hutool . core . util . RandomUtil . randomEles ( cn . hutool . core . collection . CollectionUtil . newArrayList ( 1 , 2 , 3 , 4 , 5 , 6 ) , 2 ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . size ; } | org . junit . Assert . assertEquals ( result . size ( ) , 2 ) |
shouldReturnFalseForCloseBracket ( ) { boolean start = edu . stanford . bmir . protege . web . shared . entity . EntityNameUtils . isWordStart ( ")" , 0 ) ; "<AssertPlaceHolder>" ; } isWordStart ( java . lang . String , int ) { checkNotNull ( entityName ) ; int length = entityName . length ( ) ; checkElementIndex ( ind... | org . junit . Assert . assertEquals ( false , start ) |
testMethod ( ) { final boolean [ ] result = new boolean [ ] { false } ; result [ 0 ] = new edu . rice . pcdp . await . TestAwait3 ( ) . run ( ) ; "<AssertPlaceHolder>" ; } run ( ) { edu . rice . pcdp . PCDP . finish ( ( ) -> { final int acc0 = 1 ; async ( ( ) -> { int acc1 = 2 ; async ( ( ) -> { int acc2 = 3 ; async ( ... | org . junit . Assert . assertEquals ( true , result [ 0 ] ) |
testAxpyOpRows ( ) { org . nd4j . linalg . api . ndarray . INDArray arr = org . nd4j . linalg . factory . Nd4j . create ( 1 , 4 ) . assign ( 2.0F ) ; org . nd4j . linalg . api . ndarray . INDArray ones = org . nd4j . linalg . factory . Nd4j . ones ( 1 , 4 ) . assign ( 3.0F ) ; org . nd4j . linalg . factory . Nd4j . exe... | org . junit . Assert . assertEquals ( exp , arr ) |
executeParameterizedTest ( ) { try { net . sourceforge . seqware . pipeline . runner . Runner . main ( testArgs . split ( "\\s" ) ) ; } catch ( net . sourceforge . seqware . pipeline . runner . RunnerTest . ExitException e ) { "<AssertPlaceHolder>" ; } } main ( java . lang . String [ ] ) { new net . sourceforge . seqwa... | org . junit . Assert . assertEquals ( e . status , expected ) |
testResolveUserVolumePath ( ) { java . lang . String volumeString = java . lang . String . format ( BIND_STRING_FMT , io . fabric8 . maven . docker . util . VolumeBindingUtilTest . USER_PATH , io . fabric8 . maven . docker . util . VolumeBindingUtilTest . CONTAINER_PATH ) ; java . lang . String relativizedVolumeString ... | org . junit . Assert . assertEquals ( expectedBindingString , relativizedVolumeString ) |
resolvesGradebookEntryRefDidInStudentGradebookEntryCorrectly ( ) { org . slc . sli . ingestion . NeutralRecordEntity entity = loadEntity ( "schoolId" 1 ) ; resolveInternalId ( entity ) ; java . util . Map < java . lang . String , java . lang . String > schoolNaturalKeys = new java . util . HashMap < java . lang . Strin... | org . junit . Assert . assertEquals ( refId , resolvedRef ) |
testExceptionOnUnknowwTemplate ( ) { de . neuland . jade4j . JadeConfiguration config = new de . neuland . jade4j . JadeConfiguration ( ) ; de . neuland . jade4j . template . JadeTemplate template = null ; try { template = config . getTemplate ( "UNKNOWN_PATH" ) ; org . junit . Assert . fail ( "Did<sp>expect<sp>Templat... | org . junit . Assert . assertNull ( template ) |
clear_ModelReload ( ) { lcc . getModel ( ) . getSettings ( ) . add ( new org . oscm . ui . dialog . common . ldapsettings . LdapSetting ( "key" , "value" , false ) ) ; model . setOrganizationIdentifier ( null ) ; model . setOrganizationSelectionSupported ( true ) ; lcc . clear ( ) ; verify ( lcc , times ( 1 ) ) . initP... | org . junit . Assert . assertTrue ( lcc . getModel ( ) . getSettings ( ) . isEmpty ( ) ) |
resolveNotFound ( ) { when ( servers . hasMore ( ) ) . thenReturn ( false ) ; com . hazelcast . kubernetes . DnsEndpointResolver dnsEndpointResolver = new com . hazelcast . kubernetes . DnsEndpointResolver ( com . hazelcast . kubernetes . DnsEndpointResolverTest . LOGGER , com . hazelcast . kubernetes . DnsEndpointReso... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
whenResourceIsCreated_thenUriOfTheNewlyCreatedResourceIsDiscoverable ( ) { final com . baeldung . persistence . model . Foo newResource = new com . baeldung . persistence . model . Foo ( org . apache . commons . lang3 . RandomStringUtils . randomAlphabetic ( 6 ) ) ; final io . restassured . response . Response createRe... | org . junit . Assert . assertThat ( newResource , org . hamcrest . Matchers . equalTo ( resourceFromServer ) ) |
normalGetComponentIdsByType ( ) { final long serviceId = 7117 ; final java . lang . String [ ] cidarray = new java . lang . String [ ] { ".component-1" } ; final java . util . Collection cMetadatas = new java . util . ArrayList ( ) ; cMetadatas . add ( mockServiceMetadata ) ; mockery . checking ( new org . jmock . Expe... | org . junit . Assert . assertArrayEquals ( cidarray , metadata . getComponentIdsByType ( serviceId , BlueprintMetadataMBean . SERVICE_METADATA ) ) |
testNonAsciiReturnValues ( ) { java . lang . String nonAsciiTableName = "nonAsciiTable" ; java . lang . String nonAsciiString = "'<sp>into<sp>table<sp>" 1 ; org . apache . hadoop . fs . Path nonAsciiFilePath = new org . apache . hadoop . fs . Path ( org . apache . hive . jdbc . cbo_rp_TestJdbcDriver2 . dataFileDir , "n... | org . junit . Assert . assertTrue ( resultValue . equalsIgnoreCase ( nonAsciiString ) ) |
resetShouldClearArbitraryMutableFields ( ) { net . openhft . chronicle . wire . WiresTest . StringBuilderContainer container1 = new net . openhft . chronicle . wire . WiresTest . StringBuilderContainer ( ) ; container1 . stringBuilder . setLength ( 0 ) ; container1 . stringBuilder . append ( "value1" ) ; net . openhft ... | org . junit . Assert . assertEquals ( "" , container2 . stringBuilder . toString ( ) ) |
roomInvitationsShouldDontFireOnChatCreated ( ) { final com . calclab . emite . xtesting . handlers . PairChatChangedTestHandler handler = addChatCreatedHandler ( ) ; session . receives ( ( ( ( ( ( ( "<message<sp>to='" + ( MYSELF ) ) + "'<sp>from='someroom@domain'><x<sp>xmlns='http://jabber.org/protocol/muc#user'>" ) + ... | org . junit . Assert . assertTrue ( handler . isNotCalled ( ) ) |
testConvert ( ) { java . lang . String name = "first<sp>blood" ; java . lang . String abbrName = "fb" ; java . lang . Long id = 1L ; java . lang . Long timePeriodId = 2L ; org . lnu . is . domain . timeperiod . TimePeriod timePeriod = new org . lnu . is . domain . timeperiod . TimePeriod ( ) ; timePeriod . setId ( time... | org . junit . Assert . assertEquals ( expected , actual ) |
getMessageFromReceiverLinkDoesNothing ( ) { java . lang . String linkName = "linkName" ; final tests . unit . com . microsoft . azure . sdk . iot . device . transport . amqps . AmqpsSessionManager amqpsSessionManager = new tests . unit . com . microsoft . azure . sdk . iot . device . transport . amqps . AmqpsSessionMan... | org . junit . Assert . assertNull ( amqpsMessage ) |
testGetClassLoader ( ) { org . apache . ambari . server . orm . entities . ViewEntity viewDefinition = org . apache . ambari . server . orm . entities . ViewEntityTest . getViewEntity ( ) ; "<AssertPlaceHolder>" ; } getClassLoader ( ) { return classLoader ; } | org . junit . Assert . assertEquals ( org . apache . ambari . server . orm . entities . ViewEntityTest . class . getClassLoader ( ) , viewDefinition . getClassLoader ( ) ) |
testApp ( ) { br . com . casadocodigo . java8 . List lista = br . com . casadocodigo . java8 . Arrays . asList ( 1 , 2 , 3 ) ; lista . forEach ( new br . com . casadocodigo . java8 . Consumer ( ) { public void accept ( java . lang . Object a ) { System . out . println ( a ) ; } } ) ; lista . forEach ( ( v ) -> { System... | org . junit . Assert . assertTrue ( true ) |
test ( ) { org . apache . hadoop . hbase . client . HBaseAdmin hBaseAdmin = mock ( org . apache . hadoop . hbase . client . HBaseAdmin . class ) ; org . apache . hadoop . hbase . HTableDescriptor [ ] hds = new org . apache . hadoop . hbase . HTableDescriptor [ 2 ] ; org . apache . hadoop . hbase . HTableDescriptor d1 =... | org . junit . Assert . assertEquals ( com . google . common . collect . Lists . newArrayList ( toBeDel ) , captor . getAllValues ( ) ) |
unregister ( ) { org . talend . esb . servicelocator . client . Endpoint endpoint = org . talend . esb . servicelocator . client . internal . EndpointStubFactory . create ( org . talend . esb . servicelocator . TestValues . SERVICE_QNAME_1 , org . talend . esb . servicelocator . TestValues . ENDPOINT_1 , BindingType . ... | org . junit . Assert . assertTrue ( ( ( beforeUnregister <= lastTimeStopped ) && ( lastTimeStopped <= afterUnregister ) ) ) |
callFunctionPointerVrV ( ) { final boolean [ ] called = new boolean [ ] { false } ; jnr . ffi . DelegateTest . TestLib . CallableVrV javaClosure = new jnr . ffi . DelegateTest . TestLib . CallableVrV ( ) { @ jnr . ffi . Override public void call ( ) { called [ 0 ] = true ; } } ; jnr . ffi . DelegateTest . TestLib . Cal... | org . junit . Assert . assertTrue ( called [ 0 ] ) |
customDefaultJvmRoute ( ) { java . lang . String expected = "expected" ; java . lang . System . clearProperty ( "jboss.jvmRoute" ) ; org . jboss . modcluster . container . Engine engine = mock ( org . jboss . modcluster . container . Engine . class ) ; org . jboss . modcluster . config . JvmRouteFactory defaultFactory ... | org . junit . Assert . assertSame ( expected , result ) |
testSimpleNoDecimals ( ) { org . apache . commons . math3 . linear . ArrayRealVector c = new org . apache . commons . math3 . linear . ArrayRealVector ( new double [ ] { 1 , 1 , 1 } ) ; java . lang . String expected = "{1;<sp>1;<sp>1}" ; java . lang . String actual = realVectorFormat . format ( c ) ; "<AssertPlaceHolde... | org . junit . Assert . assertEquals ( expected , actual ) |
testDeleteFiles_String ( ) { System . out . println ( "deleteFiles" ) ; this . createFile ( "file2.jpg" ) ; java . lang . String directory = folder . getRoot ( ) . getPath ( ) ; com . bixly . pastevid . util . FileUtil . deleteFiles ( directory ) ; "<AssertPlaceHolder>" ; } deleteFiles ( java . lang . String ) { if ( d... | org . junit . Assert . assertFalse ( properties . exists ( ) ) |
testEquals ( ) { org . jfree . data . time . Day day1 = new org . jfree . data . time . Day ( 29 , org . jfree . date . MonthConstants . MARCH , 2002 ) ; org . jfree . data . time . Day day2 = new org . jfree . data . time . Day ( 29 , org . jfree . date . MonthConstants . MARCH , 2002 ) ; "<AssertPlaceHolder>" ; } equ... | org . junit . Assert . assertTrue ( day1 . equals ( day2 ) ) |
testGetByPath ( ) { com . xiaomi . shepher . model . Snapshot snapshot = snapshotMapper . getByPathAndZk ( "/test/test2" , "local_test" , org . apache . commons . lang3 . time . DateUtils . parseDate ( "2016-09-20<sp>02:07:59" , new java . lang . String [ ] { "yyyy-MM-dd<sp>hh:mm:ss" } ) , 0 ) ; "<AssertPlaceHolder>" ;... | org . junit . Assert . assertNotNull ( snapshot ) |
getKafkaTopicOffsets ( ) { final long from = 1L ; final long to = 3L ; final java . util . Map < java . lang . String , java . util . Map < java . lang . Long , java . lang . Double > > expected = new java . util . HashMap ( ) ; expected . put ( StormMappedMetric . logsize . name ( ) , generateTestPointsMap ( ) ) ; exp... | org . junit . Assert . assertEquals ( expected , actual ) |
givenStartedServerWhenUploadSipThenReturnOK ( ) { final java . util . List < fr . gouv . vitam . logbook . common . parameters . LogbookOperationParameters > operationList = new java . util . ArrayList ( ) ; final fr . gouv . vitam . common . guid . GUID ingestGuid = fr . gouv . vitam . common . guid . GUIDFactory . ne... | org . junit . Assert . assertEquals ( response2 . getStatus ( ) , Status . CREATED . getStatusCode ( ) ) |
signWithMultipleDataFiles ( ) { byte [ ] digest = java . security . MessageDigest . getInstance ( "SHA-256" ) . digest ( "hello" . getBytes ( ) ) ; org . digidoc4j . DigestDataFile digestDataFile = new org . digidoc4j . DigestDataFile ( "hello.txt" , DigestAlgorithm . SHA256 , digest ) ; byte [ ] digest2 = java . secur... | org . junit . Assert . assertTrue ( signature . validateSignature ( ) . isValid ( ) ) |
testIn ( ) { com . j256 . ormlite . stmt . Where < com . j256 . ormlite . stmt . Foo , java . lang . String > where = new com . j256 . ormlite . stmt . Where < com . j256 . ormlite . stmt . Foo , java . lang . String > ( createTableInfo ( ) , null , databaseType ) ; int val = 112 ; where . in ( Foo . VAL_COLUMN_NAME , ... | org . junit . Assert . assertEquals ( sb . toString ( ) , whereSb . toString ( ) ) |
parseTime ( ) { java . time . LocalTime time = ( ( java . time . LocalTime ) ( org . jpmml . evaluator . TypeUtil . parse ( DataType . TIME , org . jpmml . evaluator . TypeUtilTest . TIME ) ) ) ; "<AssertPlaceHolder>" ; } getDataType ( java . lang . Object ) { if ( value instanceof java . lang . String ) { return org .... | org . junit . Assert . assertEquals ( DataType . TIME , org . jpmml . evaluator . TypeUtil . getDataType ( time ) ) |
get ( ) { org . searchisko . api . service . ProviderService tested = getTested ( ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; org . mockito . Mockito . when ( tested . entityService . get ( "aaa" ) ) . t... | org . junit . Assert . assertEquals ( expected , tested . get ( "aaa" ) ) |
validate_shouldPassValidationIfFieldLengthsAreCorrect ( ) { org . openmrs . ConceptNameTag cnt = new org . openmrs . ConceptNameTag ( ) ; cnt . setTag ( "tag" ) ; cnt . setVoidReason ( "VoidReason" ) ; org . springframework . validation . Errors errors = new org . springframework . validation . BindException ( cnt , "c... | org . junit . Assert . assertFalse ( errors . hasErrors ( ) ) |
testDataTagAddNode ( ) { cern . c2mon . shared . daq . serialization . DataTagAdd dataTagAdd = createDataTagAdd ( ) ; cern . c2mon . shared . daq . serialization . DataTagAdd anotherDataTagAdd = createDataTagAdd ( ) ; cern . c2mon . shared . daq . serialization . ChangeRequest changeRequest = new cern . c2mon . shared ... | org . junit . Assert . assertEquals ( changeRequest , daqRequest ) |
testMatchesGoogleVersionMurmur332SubBuffers ( ) { org . spark_project . guava . hash . HashCode hashCode = org . spark_project . guava . hash . Hashing . murmur3_32 ( 0 ) . hashBytes ( sampleData , sampleOffset , sampleLength ) ; int actual = hashCode . asInt ( ) ; int hash = murmur32 . hash ( sampleData , sampleOffset... | org . junit . Assert . assertEquals ( actual , hash ) |
flatMap_A$Function1 ( ) { com . m3 . scalaflavor4j . Nil < java . lang . String > target = com . m3 . scalaflavor4j . Nil . < java . lang . String > apply ( ) ; com . m3 . scalaflavor4j . F1 < java . lang . String , com . m3 . scalaflavor4j . CollectionLike < java . lang . String > > f = new com . m3 . scalaflavor4j . ... | org . junit . Assert . assertThat ( actual . isEmpty ( ) , org . hamcrest . CoreMatchers . is ( true ) ) |
testDeleteColumnsWithDiffColsAndTags ( ) { org . apache . hadoop . hbase . TableName tableName = createTable ( 5 ) ; try ( org . apache . hadoop . hbase . client . Table table = org . apache . hadoop . hbase . security . visibility . TEST_UTIL . getConnection ( ) . getTable ( tableName ) ) { org . apache . hadoop . hba... | org . junit . Assert . assertEquals ( 1 , next . length ) |
testIsComplete_noRecips_emptyTxs ( ) { org . nhindirect . monitor . condition . impl . GeneralCompletionCondition condition = new org . nhindirect . monitor . condition . impl . GeneralCompletionCondition ( ) ; org . nhindirect . common . tx . model . Tx originalMessage = org . nhindirect . monitor . util . TestUtils .... | org . junit . Assert . assertEquals ( 0 , recips . size ( ) ) |
equalsTest2 ( ) { java . lang . Object obj = new java . lang . Object ( ) ; niciraActionDeserializerKey = new org . opendaylight . openflowjava . nx . api . NiciraActionDeserializerKey ( org . opendaylight . openflowjava . nx . api . NiciraActionDeserializerKeyTest . VERSION , 10 ) ; "<AssertPlaceHolder>" ; } equals ( ... | org . junit . Assert . assertFalse ( niciraActionDeserializerKey . equals ( obj ) ) |
retrieveDefaultClient ( ) { "<AssertPlaceHolder>" ; } | org . junit . Assert . assertFalse ( ( ( client ) == null ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.