input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
isRequestedToChangePassword_OldWhiteSpaces ( ) { when ( request . getParameter ( anyString ( ) ) ) . thenReturn ( "<sp>" , "newPassword" , "newPassword" ) ; "<AssertPlaceHolder>" ; } isRequestedToChangePassword ( javax . servlet . http . HttpServletRequest ) { java . lang . String currentPwd = httpRequest . getParamete... | org . junit . Assert . assertTrue ( org . oscm . ui . filter . BesServletRequestReader . isRequestedToChangePassword ( request ) ) |
testAddBlueprintForUnspecifiedValue ( ) { java . lang . String response = blueprintCommands . addBlueprint ( null , null ) ; "<AssertPlaceHolder>" ; verify ( ambariClient , times ( 0 ) ) . addBlueprint ( null ) ; } addBlueprint ( java . lang . String , java . io . File ) { java . lang . String message ; try { java . la... | org . junit . Assert . assertEquals ( "No<sp>blueprint<sp>specified" , response ) |
testReportForFileSizeGroupByYearOfLastModifiedDateWithFilter ( ) { reportData = reportDao . getReportData ( filter , ReportFieldEnum . FILE_SIZE , getGroupByFieldList ( ReportFieldEnum . LAST_MODIFIED_DATE , "year" ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return size ; } | org . junit . Assert . assertTrue ( ( ( reportData . size ( ) ) > 0 ) ) |
testConvert ( ) { java . lang . Double markMin = 0.0 ; java . lang . Double markMax = 10.0 ; java . lang . Double markExchange = 5.0 ; java . lang . Long markscaleId = 1L ; org . lnu . is . domain . mark . scale . MarkScale markscale = new org . lnu . is . domain . mark . scale . MarkScale ( ) ; markscale . setId ( mar... | org . junit . Assert . assertEquals ( expected , actual ) |
testProperties ( ) { org . eurekastreams . commons . search . modelview . FieldMatch sut = new org . eurekastreams . commons . search . modelview . FieldMatch ( ) ; java . util . Map < java . lang . String , java . util . Set < java . lang . String > > map = new java . util . HashMap < java . lang . String , java . uti... | org . junit . Assert . assertSame ( map , sut . getMatchedFields ( ) ) |
setTimestamp_calendarNow_timestampIsSet ( ) { java . util . Calendar now = java . util . Calendar . getInstance ( ) ; request . setTimestamp ( now ) ; "<AssertPlaceHolder>" ; } getTimestamp ( ) { return timestamp ; } | org . junit . Assert . assertThat ( request . getTimestamp ( ) , org . hamcrest . CoreMatchers . equalTo ( now ) ) |
setPhase_n_phaseIsSet ( ) { java . lang . String phase = "N" ; sampledValue . setPhase ( phase ) ; "<AssertPlaceHolder>" ; } getPhase ( ) { return phase ; } | org . junit . Assert . assertThat ( sampledValue . getPhase ( ) , org . hamcrest . CoreMatchers . equalTo ( phase ) ) |
indexOf_returnsIndexOfMember ( ) { object . add ( "a" , true ) ; "<AssertPlaceHolder>" ; } indexOf ( java . lang . String ) { int index = table . get ( name ) ; if ( ( index != ( - 1 ) ) && ( name . equals ( names . get ( index ) ) ) ) { return index ; } return names . lastIndexOf ( name ) ; } | org . junit . Assert . assertEquals ( 0 , object . indexOf ( "a" ) ) |
shouldReturnSize0 ( ) { final uk . gov . gchq . gaffer . rest . serialisation . TextMessageBodyWriter writer = new uk . gov . gchq . gaffer . rest . serialisation . TextMessageBodyWriter ( ) ; final long size = writer . getSize ( null , null , null , null , null ) ; "<AssertPlaceHolder>" ; } getSize ( java . lang . Obj... | org . junit . Assert . assertEquals ( 0L , size ) |
searchPayments_filterByState ( ) { java . lang . String payments = aPaginatedPaymentSearchResult ( ) . withCount ( 10 ) . withPage ( 2 ) . withTotal ( 20 ) . withPayments ( aSuccessfulSearchPayment ( ) . withInProgressState ( uk . gov . pay . api . it . PaymentResourceSearchITest . TEST_STATE ) . getResults ( ) ) . bui... | org . junit . Assert . assertThat ( results , matchesState ( uk . gov . pay . api . it . PaymentResourceSearchITest . TEST_STATE ) ) |
testGetColumnChangeDetails ( ) { java . util . List < org . sagebionetworks . repo . model . table . ColumnChange > changes = org . sagebionetworks . repo . model . dbo . dao . table . TableModelTestUtils . createAddUpdateDeleteColumnChange ( ) ; java . util . List < org . sagebionetworks . repo . model . table . Colum... | org . junit . Assert . assertEquals ( expected , results ) |
testSize_oneSimpleKey ( ) { setOneSimpleKey ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . delegate . size ( ) ; } | org . junit . Assert . assertEquals ( 1 , tree . size ( ) ) |
testWindowFunctionWithGroupBy ( ) { java . lang . String sqlText = "<sp>40<sp>|<sp>2<sp>|52000<sp>|<sp>2<sp>|\n" 6 + ( ( "<sp>40<sp>|<sp>2<sp>|52000<sp>|<sp>2<sp>|\n" 5 + "from<sp>%s<sp>--SPLICE-PROPERTIES<sp>useSpark<sp>=<sp>%s<sp>\n<sp>" ) + "group<sp>by<sp>empnum,<sp>dept<sp>order<sp>by<sp>empnum" ) ; java . sql . R... | org . junit . Assert . assertEquals ( ( ( "<sp>40<sp>|<sp>2<sp>|52000<sp>|<sp>2<sp>|\n" 9 + sqlText ) + "<sp>40<sp>|<sp>2<sp>|52000<sp>|<sp>2<sp>|\n" 9 ) , expected , TestUtils . FormattedResult . ResultFactory . toStringUnsorted ( rs ) ) |
testToStringOutOfRange ( ) { int maxValue = ( com . emc . storageos . cimadapter . connections . cim . CimAlertType . values ( ) . length ) - 1 ; "<AssertPlaceHolder>" ; } toString ( int ) { com . emc . storageos . cimadapter . connections . cim . CimAlertType [ ] values = com . emc . storageos . cimadapter . connectio... | org . junit . Assert . assertEquals ( com . emc . storageos . cimadapter . connections . cim . CimAlertType . toString ( ( maxValue + 1 ) ) , java . lang . String . valueOf ( ( maxValue + 1 ) ) ) |
testToMockUpDifficultConstructor ( ) { new mockit . MockUp < org . baeldung . mocks . jmockit . AdvancedCollaborator > ( ) { @ mockit . Mock public void $init ( mockit . Invocation invocation , java . lang . String string ) { ( ( org . baeldung . mocks . jmockit . AdvancedCollaborator ) ( invocation . getInvokedInstanc... | org . junit . Assert . assertEquals ( 1 , coll . i ) |
v4Attributes ( ) { org . everit . json . schema . NumberSchema expected = org . everit . json . schema . NumberSchema . builder ( ) . minimum ( 5 ) . maximum ( 10 ) . multipleOf ( 2 ) . exclusiveMinimum ( true ) . exclusiveMaximum ( true ) . build ( ) ; org . everit . json . schema . NumberSchema actual = ( ( org . eve... | org . junit . Assert . assertEquals ( expected , actual ) |
unsubscriptionMethodCall ( ) { io . joynr . proxy . ConnectorInvocationHandler connector = createConnector ( ) ; "<AssertPlaceHolder>" ; try { io . joynr . proxy . Future < java . lang . String > future = new io . joynr . proxy . Future < java . lang . String > ( ) ; java . lang . String subscriptionId = "subscriptionI... | org . junit . Assert . assertNotNull ( connector ) |
testUploadDeprecated ( ) { com . aliyun . odps . OdpsDeprecatedLogger . getDeprecatedCalls ( ) . put ( "ABC" , 1L ) ; java . lang . String resource = "/projects/" + ( odps . getDefaultProject ( ) ) ; java . lang . String method = "GET" ; java . util . Map < java . lang . String , java . lang . String > params = null ; ... | org . junit . Assert . assertTrue ( com . aliyun . odps . OdpsDeprecatedLogger . getDeprecatedCalls ( ) . isEmpty ( ) ) |
testStartAndEndOnSubsequentLinks_setLinks ( ) { org . matsim . api . core . v01 . network . Network network = createTestNetwork ( ) ; final org . matsim . api . core . v01 . Id < org . matsim . api . core . v01 . network . Link > link13 = org . matsim . api . core . v01 . Id . create ( "13" , org . matsim . api . core ... | org . junit . Assert . assertEquals ( 0 , route . getLinkIds ( ) . size ( ) ) |
testHuidigDatumOverlijdenNietTerzake ( ) { final java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > resultaat = brby0907 . voerRegelUit ( maakOverledenHuidigePersoon ( 20130831 , "2000831<sp>00:00:00.00" ) , maakOverledenNieuwePersoon ( 20110831 ) , null , null ) ; "<AssertPlaceHolder>" ; } size ( ... | org . junit . Assert . assertEquals ( 0 , resultaat . size ( ) ) |
testTranslateContextTypeNotRecognized ( ) { int context = 100 ; java . lang . String result = org . goodoldai . jeff . report . json . JSONChunkUtility . translateContext ( context , textEchunk1 ) ; "<AssertPlaceHolder>" ; } translateContext ( int , org . goodoldai . jeff . explanation . ExplanationChunk ) { java . lan... | org . junit . Assert . assertEquals ( java . lang . String . valueOf ( context ) , result ) |
testSchemaSaving ( ) { java . net . URL schemaUrl = java . lang . Thread . currentThread ( ) . getContextClassLoader ( ) . getResource ( "configuration/manager/complexFieldsDeltaSchema.json" ) ; final org . apache . avro . Schema schema = new org . apache . avro . Schema . Parser ( ) . parse ( new java . io . File ( sc... | org . junit . Assert . assertArrayEquals ( expected , buffer . array ( ) ) |
testRemoveAll ( ) { combo . add ( "1" ) ; combo . add ( "2" ) ; combo . removeAll ( ) ; "<AssertPlaceHolder>" ; } getItems ( ) { return items ; } | org . junit . Assert . assertEquals ( 0 , combo . getItems ( ) . length ) |
testVoerRegelUitMetInschrijvingNull ( ) { final nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView huidigeSituatie = new nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView ( new nl . bzk . brp . model . hisvolledig . impl . kern . PersoonHisVolledigImpl ( new nl . bzk . brp . mod... | org . junit . Assert . assertEquals ( 0 , resultaat . size ( ) ) |
testIncMinMax ( ) { long minMask = 2 ; long maxMask = 251 ; long maxHcAddr = ( 1L << 8 ) - 1 ; long [ ] res = new long [ ] { 2 , 3 , 10 , 11 , 18 , 19 , 26 , 27 } ; long v = minMask ; for ( int i = 0 ; i < ( res . length ) ; i ++ ) { "<AssertPlaceHolder>" ; v = ch . ethz . globis . phtree . bits . TestIncrementor . inc... | org . junit . Assert . assertEquals ( res [ i ] , v ) |
pairFrom ( ) { org . eclipse . collections . api . tuple . Pair < java . lang . String , java . lang . String > pair = org . eclipse . collections . impl . tuple . Tuples . pair ( "1" , "2" ) ; Map . Entry < java . lang . String , java . lang . String > entry = pair . toEntry ( ) ; org . eclipse . collections . api . t... | org . junit . Assert . assertEquals ( pair , pair2 ) |
test_search_with_moduleName_componentNames_flowNames_success ( ) { java . nio . file . Path path = createTempDir ( ) ; org . apache . solr . core . SolrResourceLoader loader = new org . apache . solr . core . SolrResourceLoader ( path ) ; org . apache . solr . core . NodeConfig config = new org . apache . solr . core .... | org . junit . Assert . assertEquals ( "testnode" 4 , results . getResultSize ( ) , 10 ) |
matchEmptyString ( ) { java . util . HashSet < java . lang . String > exactValues = new java . util . HashSet ( ) ; exactValues . add ( "" ) ; "<AssertPlaceHolder>" ; } excludeFilter ( java . lang . String , java . util . HashSet , java . util . HashSet , java . util . HashSet , java . lang . String [ ] ) { return java... | org . junit . Assert . assertEquals ( null , excludeFilter ( "" , exactValues , null , null , null ) ) |
writeAndReadLastTxInformation ( ) { org . neo4j . kernel . impl . storemigration . participant . StoreMigrator migrator = newStoreMigrator ( ) ; org . neo4j . kernel . impl . store . TransactionId writtenTxId = new org . neo4j . kernel . impl . store . TransactionId ( random . nextLong ( ) , random . nextLong ( ) , ran... | org . junit . Assert . assertEquals ( writtenTxId , readTxId ) |
testFallback ( ) { parameters . add ( ff2 . literal ( "abc12_67" ) ) ; parameters . add ( ff2 . literal ( ".*(\\d{3})_(\\d{3})" ) ) ; parameters . add ( ff2 . literal ( "first${1}_second${2}_full${0}" ) ) ; parameters . add ( ff2 . literal ( "noMatch" ) ) ; org . opengis . filter . expression . Function fn = finder . f... | org . junit . Assert . assertEquals ( "noMatch" , result ) |
testContainsWithLowerIntersect ( ) { opennlp . tools . util . Span a = new opennlp . tools . util . Span ( 500 , 900 ) ; opennlp . tools . util . Span b = new opennlp . tools . util . Span ( 450 , 1000 ) ; "<AssertPlaceHolder>" ; } contains ( opennlp . tools . util . Span ) { return ( ( start ) <= ( s . getStart ( ) ) ... | org . junit . Assert . assertEquals ( false , a . contains ( b ) ) |
nextNull ( ) { victim = new org . sejda . sambox . input . COSParser ( inMemorySeekableSourceFrom ( "53<sp>0<sp>obj<sp><</key<sp>null>>" . getBytes ( ) ) ) ; victim . position ( 16 ) ; "<AssertPlaceHolder>" ; } nextNull ( ) { victim = new org . sejda . sambox . input . COSParser ( inMemorySeekableSourceFrom ( "53<sp>0<... | org . junit . Assert . assertEquals ( COSNull . NULL , victim . nextNull ( ) ) |
testMinMaxValueRanges ( ) { for ( final password . pwm . config . PwmSetting pwmSetting : password . pwm . config . PwmSetting . values ( ) ) { final long minValue = java . lang . Long . parseLong ( pwmSetting . getProperties ( ) . getOrDefault ( PwmSettingProperty . Minimum , "0" ) ) ; final long maxValue = java . lan... | org . junit . Assert . assertTrue ( ( maxValue > minValue ) ) |
testSumReducer ( ) { java . lang . Double [ ] [ ] testLists = new java . lang . Double [ ] [ ] { new com . salesforce . dva . argus . service . metric . transform . Double [ ] { } , new com . salesforce . dva . argus . service . metric . transform . Double [ ] { null , null } , new com . salesforce . dva . argus . serv... | org . junit . Assert . assertEquals ( expResult , result ) |
testGroupTrashDisabled ( ) { com . liferay . portal . kernel . model . Group group = createGroup ( com . liferay . portal . kernel . test . util . TestPropsValues . getCompanyId ( ) ) ; createFileEntryTrashEntry ( group , false ) ; com . liferay . trash . test . util . TrashTestUtil . disableTrash ( group ) ; com . lif... | org . junit . Assert . assertEquals ( 0 , com . liferay . trash . service . TrashEntryLocalServiceUtil . getTrashEntriesCount ( ) ) |
testApplyImpulsesRight ( ) { com . rubentxu . juegos . core . managers . HeroManagerTest . controller . rightPressed ( ) ; com . rubentxu . juegos . core . managers . HeroManagerTest . heroManager . applyImpulses ( com . rubentxu . juegos . core . managers . HeroManagerTest . r . getVelocity ( ) , com . rubentxu . jueg... | org . junit . Assert . assertTrue ( com . rubentxu . juegos . core . managers . HeroManagerTest . r . getVelocity ( ) . toString ( ) , ( ( velocity . x ) < ( com . rubentxu . juegos . core . managers . HeroManagerTest . r . getVelocity ( ) . x ) ) ) |
testJDBCTableVTI ( ) { java . lang . String sql = java . lang . String . format ( "select<sp>*<sp>from<sp>table<sp>(JDBCTableVTI('jdbc:splice://localhost:1527/splicedb;create=true;user=splice;password=admin',<sp>'%s',<sp>'%s'))a" , com . splicemachine . derby . impl . sql . execute . operations . VTIOperationIT . CLASS... | org . junit . Assert . assertEquals ( 2 , count ) |
testFindAnnotation ( ) { java . lang . reflect . Method method = this . getClass ( ) . getDeclaredMethod ( "testFindAnnotation" ) ; java . lang . annotation . Annotation [ ] annotations = method . getAnnotations ( ) ; org . junit . Test annotation = com . navercorp . pinpoint . profiler . util . TypeUtils . findAnnotat... | org . junit . Assert . assertEquals ( annotation . annotationType ( ) , org . junit . Test . class ) |
testCreateMessageEOFExceptionFillsMessageFromMCauseessageParamToStringWhenMessageIsEmpty ( ) { javax . jms . JMSException result = org . apache . qpid . jms . exceptions . JmsExceptionSupport . createMessageEOFException ( EMPTY_MESSAGE_CAUSE ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( "JmsConnectionConsumer<s... | org . junit . Assert . assertEquals ( EMPTY_MESSAGE_CAUSE . toString ( ) , result . getMessage ( ) ) |
sumInteger ( ) { com . gs . collections . api . RichIterable < java . lang . Integer > objects = this . newWith ( 1 , 2 , 3 ) ; long expected = objects . injectInto ( 0L , AddFunction . INTEGER_TO_LONG ) ; long actual = objects . sumOfInt ( ( integer ) -> integer ) ; "<AssertPlaceHolder>" ; } sumOfInt ( com . gs . coll... | org . junit . Assert . assertEquals ( expected , actual ) |
getColumnsSql ( ) { System . out . println ( t . getColumnsSql ( ) ) ; "<AssertPlaceHolder>" ; } getColumnsSql ( ) { System . out . println ( t . getColumnsSql ( ) ) ; org . junit . Assert . assertEquals ( "user_id<sp>userId,user_name<sp>userName,pwd<sp>pwd" , t . getColumnsSql ( ) ) ; } | org . junit . Assert . assertEquals ( "user_id<sp>userId,user_name<sp>userName,pwd<sp>pwd" , t . getColumnsSql ( ) ) |
testRegression ( ) { org . languagetool . JLanguageTool lt = new org . languagetool . JLanguageTool ( new org . languagetool . language . GermanyGerman ( ) ) ; java . lang . String str = "Und<sp>so.\r\nDie<sp>Bier." ; java . util . List < org . languagetool . rules . RuleMatch > matches = lt . check ( str ) ; "<AssertP... | org . junit . Assert . assertEquals ( 1 , matches . size ( ) ) |
testEncodeQuadTreeNodeIds ( ) { com . google . common . io . ByteArrayDataOutput out = com . google . common . io . ByteStreams . newDataOutput ( ) ; java . util . List < org . locationtech . geogig . model . internal . NodeId > nodes = new java . util . ArrayList ( ) ; int size = 10 ; for ( int i = 0 ; i < size ; i ++... | org . junit . Assert . assertEquals ( nodes , decoded ) |
testAddLong ( ) { java . lang . Long sb = 1L ; org . redisson . api . RSetReactive < java . lang . Long > set = redisson . getSet ( "simple_longs" ) ; sync ( set . add ( sb ) ) ; for ( java . lang . Long l : sync ( set ) ) { "<AssertPlaceHolder>" ; } } sync ( org . redisson . api . RScoredSortedSetReactive ) { return o... | org . junit . Assert . assertEquals ( sb . getClass ( ) , l . getClass ( ) ) |
testDescribeSecurityGroupIPSets ( ) { com . fit2cloud . qingcloud . wsclient . DescribeSecurityGroupIPSetsRequest describeSecurityGroupIPSetsRequest = new com . fit2cloud . qingcloud . wsclient . DescribeSecurityGroupIPSetsRequest ( ) ; describeSecurityGroupIPSetsRequest . setZone ( QingCloudZone . PEK1 ) ; com . fit2c... | org . junit . Assert . assertTrue ( ( ( describeSecurityGroupIPSetsResponse . getRet_code ( ) ) == 0 ) ) |
testRetainOverflow2 ( ) { io . netty . util . AbstractReferenceCounted referenceCounted = io . netty . util . AbstractReferenceCountedTest . newReferenceCounted ( ) ; "<AssertPlaceHolder>" ; referenceCounted . retain ( Integer . MAX_VALUE ) ; } refCnt ( ) { return buf . refCnt ( ) ; } | org . junit . Assert . assertEquals ( 1 , referenceCounted . refCnt ( ) ) |
test_user_webhooks_parse_stats_get ( ) { com . sendgrid . SendGrid sg = new com . sendgrid . SendGrid ( "SENDGRID_API_KEY" , true ) ; sg . setHost ( "localhost:4010" ) ; sg . addRequestHeader ( "X-Mock" , "200" ) ; com . sendgrid . Request request = new com . sendgrid . Request ( ) ; request . setMethod ( Method . GET ... | org . junit . Assert . assertEquals ( 200 , response . getStatusCode ( ) ) |
isActive_nodeIsVisibleAndNoParent_nodeIsActive ( ) { com . vaadin . client . flow . StateTreeTest . TestVisibilityTree tree = new com . vaadin . client . flow . StateTreeTest . TestVisibilityTree ( ) ; com . vaadin . client . flow . StateNode stateNode = new com . vaadin . client . flow . StateNode ( 7 , tree ) ; tree ... | org . junit . Assert . assertTrue ( tree . isActive ( stateNode ) ) |
getUniqueUserId ( ) { servlet . setExpectedMethodName ( "getUniqueUserId" ) ; servlet . setFakeResponse ( "user1" ) ; "<AssertPlaceHolder>" ; } getUniqueUserId ( java . lang . String ) { return userRegistry . getUniqueUserId ( securityName ) ; } | org . junit . Assert . assertEquals ( "user1" , servlet . getUniqueUserId ( "user1" ) ) |
testSetName ( ) { org . eclipse . rap . rwt . template . Cell cell = new org . eclipse . rap . rwt . template . TestCell ( template , "foo" ) ; cell . setName ( "bar" ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; } | org . junit . Assert . assertEquals ( "bar" , cell . getName ( ) ) |
testDelete ( ) { final org . geotools . data . Query queryAll = new org . geotools . data . Query ( org . geoserver . feature . retype . RetypingDataStoreTest . RENAMED ) ; org . geotools . data . simple . SimpleFeatureStore store ; store = ( ( org . geotools . data . simple . SimpleFeatureStore ) ( rts . getFeatureSou... | org . junit . Assert . assertEquals ( ( count - 1 ) , store . getCount ( queryAll ) ) |
AccessInstanceVariableWrite ( ) { java . lang . String fromClass = "Domain.Direct.Violating.AccessInstanceVariableWrite" ; java . lang . String toClass = "Technology.Direct.Dao.ProfileDAO" ; java . util . ArrayList < java . lang . String > typesToFind = new java . util . ArrayList < java . lang . String > ( ) ; typesTo... | org . junit . Assert . assertTrue ( areDependencyTypesDetected ( fromClass , toClass , typesToFind , false ) ) |
testFinderFindById ( ) { org . springframework . data . neo4j . support . Person p = org . springframework . data . neo4j . Person . persistedPerson ( "Michael" , 35 ) ; org . springframework . data . neo4j . support . Person pById = personRepository . findOne ( p . getNodeId ( ) ) ; "<AssertPlaceHolder>" ; } findOne (... | org . junit . Assert . assertEquals ( p , pById ) |
toImmutable ( ) { org . eclipse . collections . api . multimap . ImmutableMultimap < java . lang . String , java . lang . String > empty = this . classUnderTest ( ) ; "<AssertPlaceHolder>" ; } toImmutable ( ) { return this ; } | org . junit . Assert . assertSame ( empty , empty . toImmutable ( ) ) |
testUnlabledClosureFail ( ) { abstract class Action implements com . threerings . io . Streamable { public abstract java . lang . String act ( ) ; } Action act = new Action ( ) { @ com . threerings . io . Override public java . lang . String act ( ) { return "bang!" ; } } ; Action react = ( ( Action ) ( com . threering... | org . junit . Assert . assertEquals ( act . act ( ) , react . act ( ) ) |
testLimitOk ( ) { final org . jacoco . report . check . Rule rule = new org . jacoco . report . check . Rule ( ) ; rule . setElement ( ElementType . BUNDLE ) ; final org . jacoco . report . check . Limit limit = rule . createLimit ( ) ; limit . setMinimum ( "0.25" ) ; rules . add ( rule ) ; final org . jacoco . report ... | org . junit . Assert . assertEquals ( java . util . Collections . emptyList ( ) , messages ) |
testGetUserMail ( ) { org . bonitasoft . engine . api . APIAccessor apiAccessor = org . mockito . Mockito . mock ( org . bonitasoft . engine . api . APIAccessor . class ) ; org . bonitasoft . engine . api . IdentityAPI identityApi = org . mockito . Mockito . mock ( org . bonitasoft . engine . api . IdentityAPI . class ... | org . junit . Assert . assertEquals ( waiting , receive ) |
shouldProperlyCalculateNextPositionAwayFromTarget ( ) { net . evlikat . siberian . geo . Position next = net . evlikat . siberian . geo . Position . on ( 5 , 3 ) . awayFrom ( net . evlikat . siberian . geo . Position . on ( 2 , 2 ) , net . evlikat . siberian . geo . PositionTest . ALL ) ; "<AssertPlaceHolder>" ; } on (... | org . junit . Assert . assertEquals ( net . evlikat . siberian . geo . Position . on ( 6 , 3 ) , next ) |
testRepeatedLocalVarsNames2 ( ) { final com . ea . async . Task < java . lang . Integer > res = com . ea . async . Task . done ( ) . thenCompose ( ( o ) -> { { java . lang . String a = "a1" ; java . lang . String b = "b1" ; int c = 1 ; } await ( getBlockedTask ( ) ) ; { java . lang . String a = "a2" ; java . lang . Str... | org . junit . Assert . assertEquals ( ( ( java . lang . Integer ) ( 10 ) ) , res . join ( ) ) |
testNonLeapYear ( ) { final long time = 75470203439504394L ; final org . locationtech . geowave . core . geotime . index . dimension . TemporalBinningStrategy binStrategy = new org . locationtech . geowave . core . geotime . index . dimension . TemporalBinningStrategy ( org . locationtech . geowave . core . geotime . i... | org . junit . Assert . assertEquals ( 2 , ranges . length ) |
testTraverseIgnoreDisabled ( ) { System . out . println ( "test:traverseIgnoreDisabled" ) ; org . glassfish . flashlight . datatree . TreeNode server = setupComplexTree ( ) ; org . glassfish . flashlight . datatree . TreeNode wtoson = server . getNode ( "wto.wtoson" ) ; wtoson . setEnabled ( false ) ; java . util . Lis... | org . junit . Assert . assertEquals ( expected . length , list . size ( ) ) |
test_GetComboBox_By_Name ( ) { when ( element . findFirst ( mmarquee . automation . BaseAutomationTest . isTreeScope ( TreeScope . Descendants ) , any ( ) ) ) . thenReturn ( targetElement ) ; mmarquee . automation . controls . AutomationComboBox comboBox = spyWndw . getComboBox ( mmarquee . automation . controls . Sear... | org . junit . Assert . assertEquals ( targetElement , comboBox . getElement ( ) ) |
returnsSoapSpecific ( ) { com . betfair . cougar . transport . impl . protocol . http . DefaultExecutionContextResolverFactory factory = new com . betfair . cougar . transport . impl . protocol . http . DefaultExecutionContextResolverFactory ( ) ; com . betfair . cougar . transport . api . DehydratedExecutionContextRes... | org . junit . Assert . assertTrue ( ( ( resolvers [ 0 ] ) instanceof com . betfair . cougar . transport . impl . protocol . http . SoapIdentityTokenResolver ) ) |
testHashCodeWithTheSameDescription ( ) { import1 . setDescription ( new org . kie . workbench . common . dmn . api . property . dmn . Description ( "desc" ) ) ; import2 . setDescription ( new org . kie . workbench . common . dmn . api . property . dmn . Description ( "desc" ) ) ; "<AssertPlaceHolder>" ; } hashCode ( ) ... | org . junit . Assert . assertEquals ( import1 . hashCode ( ) , import2 . hashCode ( ) ) |
shouldRetrunTrueWhenCheckIfProductIsNotUsedIfProductIsNull ( ) { java . lang . String belongsToProductName = "product" ; java . lang . String belongsToCompanyName = "company" ; java . lang . String hasManyName = "products" ; given ( companyProduct . getId ( ) ) . willReturn ( null ) ; given ( companyProduct . getBelong... | org . junit . Assert . assertTrue ( result ) |
testEncryptLimitedCiphertextChannel ( ) { int segmentSize = 512 ; int firstSegmentOffset = 0 ; int keySizeInBytes = 16 ; byte [ ] ikm = com . google . crypto . tink . TestUtil . hexDecode ( "000102030405060708090a0b0c0d0e0f00112233445566778899aabbccddeeff" ) ; com . google . crypto . tink . subtle . AesGcmHkdfStreaming... | org . junit . Assert . assertFalse ( encChannel . isOpen ( ) ) |
equals_same_instance ( ) { final net . ripe . db . whois . update . dns . DnsCheckRequest dnsCheckRequest = new net . ripe . db . whois . update . dns . DnsCheckRequest ( update , "domain" , "glue" ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == o ) return true ; if ( ( o == null ) || (... | org . junit . Assert . assertThat ( dnsCheckRequest . equals ( dnsCheckRequest ) , org . hamcrest . Matchers . is ( true ) ) |
testErrorIDGenerator_null_org_name ( ) { boolean isArgException = false ; try { org . ebayopensource . turmeric . tools . errorlibrary . ErrorIdGeneratorFactory . getErrorIdGenerator ( org . ebayopensource . turmeric . tools . errorlibrary . ErrorIdGeneratorTests . MARKET_PLACES_STORE_LOCATION , null ) ; } catch ( java... | org . junit . Assert . assertTrue ( isArgException ) |
test_NotRepaired_Math32 ( ) { int maxSolutions = 4 ; java . io . File filef = new java . io . File ( "src/test/resources/changes_analisis_frequency.json" ) ; "<AssertPlaceHolder>" ; fr . inria . main . CommandSummary command = fr . inria . astor . test . repair . evaluation . regression . MathCommandsTests . getMath32C... | org . junit . Assert . assertTrue ( filef . exists ( ) ) |
testDynamicQueryByPrimaryKeyMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . polls . model . PollsQuestion . class , _dynamicQueryClassLoader ) ; dynamicQuery . add ( com . liferay .... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
testJavaServiceTaskBean ( ) { com . effektif . workflow . api . workflow . ExecutableWorkflow workflow = new com . effektif . workflow . api . workflow . ExecutableWorkflow ( ) . activity ( "invoke<sp>bean" , new com . effektif . workflow . api . activities . JavaServiceTask ( ) . beanName ( "myBean" ) . methodName ( "... | org . junit . Assert . assertEquals ( "world" , myBean . msg ) |
testJoinAllEmptyElements ( ) { java . util . Set < java . lang . String > elements = new java . util . LinkedHashSet ( ) ; java . lang . String separator = "," ; elements . add ( "" ) ; elements . add ( "" ) ; java . lang . String join = com . erudika . para . utils . filters . CORSFilter . join ( elements , separator ... | org . junit . Assert . assertTrue ( "" . equals ( join ) ) |
testDoDecryptRecordsMigrationExceptionWithInvalidChecksum ( ) { expectZipWithChecksum ( false ) ; final org . codice . ddf . migration . MigrationReport report = configurationMigrationManager . doDecrypt ( path ) ; "<AssertPlaceHolder>" ; reportHasErrorMessage ( report . errors ( ) , org . hamcrest . Matchers . equalTo... | org . junit . Assert . assertThat ( report . wasSuccessful ( ) , org . hamcrest . Matchers . equalTo ( false ) ) |
testInterruptedWriteWithResponse ( ) { com . google . api . client . testing . http . javanet . MockHttpURLConnection connection = new com . google . api . client . testing . http . javanet . MockHttpURLConnection ( new java . net . URL ( com . google . api . client . testing . http . HttpTesting . SIMPLE_URL ) ) { @ c... | org . junit . Assert . assertEquals ( 401 , response . getStatusCode ( ) ) |
testGetSetReverseTableMapper ( ) { com . liferay . portal . kernel . service . persistence . impl . TableMapper < com . liferay . portal . kernel . internal . service . persistence . TableMapperTest . Right , com . liferay . portal . kernel . internal . service . persistence . TableMapperTest . Left > tableMapper = new... | org . junit . Assert . assertSame ( tableMapper , _tableMapperImpl . getReverseTableMapper ( ) ) |
saveDescriptorWhenDescriptorDidNotExistAndIAmGlobalAdmin ( ) { when ( this . authorizationManager . hasAccess ( Right . ADMIN , currentUserRef , new org . xwiki . model . reference . WikiReference ( "mainWiki" ) ) ) . thenReturn ( true ) ; org . xwiki . wiki . descriptor . WikiDescriptor descriptor = new org . xwiki . ... | org . junit . Assert . assertTrue ( result ) |
testBigDecimalBigIntegerCoercion ( ) { java . lang . String str = ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "import<sp>" + ( org . drools . modelcompiler . domain . Person . class . getCanonicalName ( ) ) ) + ";\n" ) + "import<sp>" ) + ( java . math . BigInteger . class . getCanonicalName ( ) ) ) + ";\n" ) + "rule<sp>\"rul... | org . junit . Assert . assertEquals ( 1 , ksession1 . fireAllRules ( ) ) |
testAddVariableToRootAndInnerProperty ( ) { java . util . Map < java . lang . String , java . lang . Object > commandMap = new java . util . LinkedHashMap ( ) ; java . util . Map < java . lang . String , java . lang . Object > pParams = new java . util . LinkedHashMap ( ) ; java . util . Map < java . lang . String , ja... | org . junit . Assert . assertEquals ( expectedMap , actualMap ) |
testEncoding ( ) { java . lang . String title = "éèêëààäìîïùûù" ; org . nuxeo . ecm . automation . client . model . Document folder = ( ( org . nuxeo . ecm . automation . client . model . Document ) ( session . newRequest ( CreateDocument . ID ) . setInput ( automationTestFolder ) . set ( "type" , "Folder" ) . set ( "n... | org . junit . Assert . assertEquals ( folder . getTitle ( ) , title ) |
trims ( ) { com . itextpdf . styledxmlparser . jsoup . parser . Tag p1 = com . itextpdf . styledxmlparser . jsoup . parser . Tag . valueOf ( "p" ) ; com . itextpdf . styledxmlparser . jsoup . parser . Tag p2 = com . itextpdf . styledxmlparser . jsoup . parser . Tag . valueOf ( "<sp>p<sp>" ) ; "<AssertPlaceHolder>" ; } ... | org . junit . Assert . assertEquals ( p1 , p2 ) |
returnsFalseIfMemDemandLow ( ) { com . microsoft . dhalion . conf . PolicyConfig policyConf = new com . microsoft . dhalion . conf . PolicyConfig ( "policy" , java . util . Collections . emptyMap ( ) ) ; com . microsoft . dhalion . detectors . ExcessMemoryDetector detector = new com . microsoft . dhalion . detectors . ... | org . junit . Assert . assertFalse ( detector . evaluate ( "" , 10 , 10 ) ) |
testSave ( ) { me . hao0 . diablo . server . model . Response < java . lang . Long > saveResp = configService . save ( 1L , "test" , "test_value" ) ; "<AssertPlaceHolder>" ; } isSuccess ( ) { return ( status . intValue ( ) ) == ( me . hao0 . diablo . common . model . JsonResponse . OK . intValue ( ) ) ; } | org . junit . Assert . assertTrue ( saveResp . isSuccess ( ) ) |
testDescriptions ( ) { java . util . Map < java . lang . String , java . lang . String > desc = com . google . common . collect . ImmutableMap . < java . lang . String , java . lang . String > builder ( ) . put ( "B" , "byte" ) . put ( "S" , "double[][][]" 9 ) . put ( "[LFoo;" 5 , "[LFoo;" 8 ) . put ( "double[][][]" 8 ... | org . junit . Assert . assertEquals ( entry . getValue ( ) , com . spotify . missinglink . datamodel . TypeDescriptors . fromRaw ( entry . getKey ( ) ) . toString ( ) ) |
test_clients_stats_get ( ) { com . sendgrid . SendGrid sg = new com . sendgrid . SendGrid ( "SENDGRID_API_KEY" , true ) ; sg . setHost ( "localhost:4010" ) ; sg . addRequestHeader ( "X-Mock" , "200" ) ; com . sendgrid . Request request = new com . sendgrid . Request ( ) ; request . setMethod ( Method . GET ) ; request ... | org . junit . Assert . assertEquals ( 200 , response . getStatusCode ( ) ) |
performance ( ) { int iterations = 200 ; System . out . println ( "NPOI:" ) ; long start = java . lang . System . currentTimeMillis ( ) ; for ( int i = 0 ; i < iterations ; i ++ ) { try ( java . io . InputStream inputStream = org . apache . poi . POIDataSamples . getHSMFInstance ( ) . openResourceAsStream ( "lots-of-re... | org . junit . Assert . assertTrue ( file . delete ( ) ) |
testGetTimestampParser_LocalTimeZone ( ) { java . sql . Timestamp ts = new java . sql . Timestamp ( org . apache . phoenix . util . DateUtil . getDateTimeParser ( "yyyy-MM-dd<sp>HH:mm:ss" , PTimestamp . INSTANCE , java . util . TimeZone . getDefault ( ) . getID ( ) ) . parseDateTime ( "1970-01-01<sp>00:00:00" ) ) ; "<A... | org . junit . Assert . assertEquals ( java . sql . Timestamp . valueOf ( "1970-01-01<sp>00:00:00" ) , ts ) |
shouldReturnZeroWhenMergedInto ( ) { final org . eclipse . jgit . revwalk . RevCommit a = commit ( ) ; final org . eclipse . jgit . revwalk . RevCommit b = commit ( a ) ; "<AssertPlaceHolder>" ; } count ( org . eclipse . jgit . revwalk . RevCommit , org . eclipse . jgit . revwalk . RevCommit ) { return org . eclipse . ... | org . junit . Assert . assertEquals ( 0 , count ( a , b ) ) |
test4 ( ) { com . creactiviti . piper . core . job . SimpleJob completedJobYesterday = new com . creactiviti . piper . core . job . SimpleJob ( ) ; completedJobYesterday . setId ( "1" ) ; completedJobYesterday . setPipelineId ( "demo:1234" ) ; completedJobYesterday . setCreateTime ( java . util . Date . from ( java . t... | org . junit . Assert . assertEquals ( 5 , todayJobs ) |
testCompareTo013 ( ) { javax . naming . ldap . LdapName ln = new javax . naming . ldap . LdapName ( "T=<sp>teSt1" ) ; javax . naming . ldap . LdapName ln2 = new javax . naming . ldap . LdapName ( "t=test1<sp>" ) ; "<AssertPlaceHolder>" ; } compareTo ( com . ibm . ws . pmi . server . data . SpdData ) { if ( ( dataId ) <... | org . junit . Assert . assertTrue ( ( ( ln . compareTo ( ln2 ) ) == 0 ) ) |
testReturnTypeExceptionWithTrue ( ) { boolean expected = true ; boolean result = org . slieb . throwables . DoublePredicateWithThrowable . castDoublePredicateWithThrowable ( ( v1 ) -> { throw new java . lang . Exception ( "expect<sp>exception" ) ; } ) . thatReturnsOnCatch ( expected ) . test ( 0 ) ; "<AssertPlaceHolder... | org . junit . Assert . assertEquals ( expected , result ) |
testAppleLibraryIsNotXcodeTargetTestBuildRuleType ( ) { com . facebook . buck . io . filesystem . ProjectFilesystem projectFilesystem = new com . facebook . buck . io . filesystem . impl . FakeProjectFilesystem ( ) ; com . facebook . buck . core . model . BuildTarget buildTarget = com . facebook . buck . core . model .... | org . junit . Assert . assertFalse ( com . facebook . buck . apple . AppleBuildRules . isXcodeTargetTestBuildRule ( libraryRule ) ) |
testServerWorks ( ) { org . jacorb . test . BasicServer server = org . jacorb . test . BasicServerHelper . narrow ( rootPOA . servant_to_reference ( new org . jacorb . test . orb . BasicServerImpl ( ) ) ) ; long now = java . lang . System . currentTimeMillis ( ) ; "<AssertPlaceHolder>" ; } bounce_long_long ( long ) { r... | org . junit . Assert . assertEquals ( now , server . bounce_long_long ( now ) ) |
construct_withFilledArgNameAndNullCause ( ) { final net . sf . qualitycheck . exception . IllegalNullElementsException e = new net . sf . qualitycheck . exception . IllegalNullElementsException ( "argName" , null ) ; final java . lang . String expected = "The<sp>passed<sp>argument<sp>'argName'<sp>must<sp>not<sp>contain... | org . junit . Assert . assertEquals ( expected , e . getMessage ( ) ) |
testVoerRegelUitGeenMeldingenDienstIsNietRelevant ( ) { final int leveringsautorisatieId = 10 ; final java . lang . String afnemerCode = "000123" ; final nl . bzk . algemeenbrp . dal . domein . brp . enums . SoortDienst soortDienst = nl . bzk . algemeenbrp . dal . domein . brp . enums . SoortDienst . ATTENDERING ; fina... | org . junit . Assert . assertNull ( melding ) |
testAmbiguityFromInheritedType ( ) { com . google . auto . value . AutoValueTest . InheritsNestedType inheritsNestedType = com . google . auto . value . AutoValueTest . InheritsNestedType . create ( com . google . common . base . Optional . absent ( ) ) ; "<AssertPlaceHolder>" ; } getOptional ( ) { return optional ; } | org . junit . Assert . assertEquals ( com . google . common . base . Optional . absent ( ) , inheritsNestedType . getOptional ( ) ) |
testGetMaterializeSourceTarget_AlreadyMaterialized ( ) { when ( pcollection . getMaterializedAt ( ) ) . thenReturn ( readableSourceTarget ) ; "<AssertPlaceHolder>" ; } getMaterializeSourceTarget ( org . apache . crunch . PCollection ) { org . apache . crunch . impl . dist . collect . PCollectionImpl < T > impl = toPCol... | org . junit . Assert . assertEquals ( readableSourceTarget , pipeline . getMaterializeSourceTarget ( pcollection ) ) |
testShiftNullDouble ( ) { final double [ ] array = null ; org . apache . commons . lang3 . ArrayUtils . shift ( array , 1 ) ; "<AssertPlaceHolder>" ; } shift ( java . lang . Object [ ] , int ) { if ( array == null ) { return ; } org . apache . commons . lang3 . ArrayUtils . shift ( array , 0 , array . length , offset )... | org . junit . Assert . assertNull ( array ) |
testValue ( ) { org . eclipse . rap . rwt . internal . theme . css . ConditionalValue conditionalValue = new org . eclipse . rap . rwt . internal . theme . css . ConditionalValue ( org . eclipse . rap . rwt . internal . theme . CssColor . BLACK ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertSame ( CssColor . BLACK , conditionalValue . value ) |
testEqualsWithText ( ) { org . antlr . runtime . tree . TreeWizard wiz = new org . antlr . runtime . tree . TreeWizard ( org . antlr . test . TestTreeWizard . adaptor , org . antlr . test . TestTreeWizard . tokens ) ; org . antlr . runtime . tree . CommonTree t1 = ( ( org . antlr . runtime . tree . CommonTree ) ( wiz .... | org . junit . Assert . assertTrue ( same ) |
testBuildResourcePath_baseSlash ( ) { java . lang . String basePath = "/" ; java . lang . String path = "/1/2/3" ; "<AssertPlaceHolder>" ; } buildResourcePath ( java . lang . String , java . lang . String ) { if ( basePath == null ) { basePath = "" ; } java . lang . String base = trimSlashes ( basePath ) ; if ( ! ( bas... | org . junit . Assert . assertEquals ( "/1/2/3" , client . buildResourcePath ( basePath , path ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.