input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
withOne ( ) { "<AssertPlaceHolder>" ; } swap ( int ) { return ( ( - 1431655766 & n ) > > > 1 ) | ( ( 1431655765 & n ) << 1 ) ; } | org . junit . Assert . assertEquals ( 2 , s . swap ( 1 ) ) |
testRawBlock ( ) { org . xwiki . rendering . renderer . printer . DefaultWikiPrinter printer = new org . xwiki . rendering . renderer . printer . DefaultWikiPrinter ( ) ; this . renderer . setPrinter ( printer ) ; this . renderer . onRawText ( "raw<sp>content" , Syntax . PLAIN_1_0 ) ; "<AssertPlaceHolder>" ; } toString... | org . junit . Assert . assertEquals ( "raw<sp>content" , printer . toString ( ) ) |
shouldRaiseConstraintsViolationCheckingTheTitleValue ( ) { java . util . Set < javax . validation . ConstraintViolation < org . agoncal . book . javaee7 . chapter03 . ex14 . Book14 > > violations = org . agoncal . book . javaee7 . chapter03 . ex14 . Book14Test . validator . validateValue ( org . agoncal . book . javaee... | org . junit . Assert . assertEquals ( 1 , violations . size ( ) ) |
testStringBuffer ( ) { org . log4mongo . TestLoggingEventBsonifierImpl . LoggingEventBsonifierImplSubclass bsonifier = new org . log4mongo . TestLoggingEventBsonifierImpl . LoggingEventBsonifierImplSubclass ( ) ; com . mongodb . DBObject bson = new com . mongodb . BasicDBObject ( ) ; java . lang . String key = "thekey"... | org . junit . Assert . assertEquals ( sb . toString ( ) , retrievedValue ) |
testWriteLambdaExpressionEmptyIntroducerExceptionSpecificationDeclarator ( ) { org . eclipse . cdt . core . dom . ast . cpp . ICPPASTLambdaExpression lambda = org . eclipse . cdt . core . parser . tests . rewrite . astwriter . ExpressionWriterTest . getEmptyLambdaExpression ( ) ; org . eclipse . cdt . core . dom . ast ... | org . junit . Assert . assertEquals ( r , visitor . toString ( ) ) |
testDirectedPaths ( ) { java . util . List < edu . cmu . tetrad . test . Node > nodes = new edu . cmu . tetrad . test . ArrayList ( ) ; for ( int i1 = 0 ; i1 < 6 ; i1 ++ ) { nodes . add ( new edu . cmu . tetrad . test . ContinuousVariable ( ( "X" + ( i1 + 1 ) ) ) ) ; } edu . cmu . tetrad . test . Graph graph = new edu ... | org . junit . Assert . assertTrue ( graph . isAncestorOf ( path . get ( 0 ) , path . get ( ( ( path . size ( ) ) - 1 ) ) ) ) |
testGetEffectiveStateForHostAlert ( ) { com . google . inject . Injector injector = createStrictMock ( com . google . inject . Injector . class ) ; org . apache . ambari . server . controller . MaintenanceStateHelper maintenanceStateHelper = createMockBuilder ( org . apache . ambari . server . controller . MaintenanceS... | org . junit . Assert . assertEquals ( MaintenanceState . ON , state ) |
testValidateStringIsNotEmptyWithNullString ( ) { generalSettingsPresenter . validateStringIsNotEmpty ( null , "Message" ) . then ( ( e ) -> { org . junit . Assert . fail ( "Promise<sp>should've<sp>not<sp>been<sp>resolved!" ) ; return promises . resolve ( ) ; } ) . catch_ ( ( e ) -> { "<AssertPlaceHolder>" ; return prom... | org . junit . Assert . assertEquals ( e , "Message" ) |
getLocalMapq_should_be_max_evidence_mapq ( ) { java . util . List < au . edu . wehi . idsv . DirectedEvidence > support = com . google . common . collect . Lists . < au . edu . wehi . idsv . DirectedEvidence > newArrayList ( SCE ( au . edu . wehi . idsv . FWD , withMapq ( 10 , Read ( 0 , 1 , "1M2S" ) ) ) , SCE ( au . e... | org . junit . Assert . assertEquals ( 30 , ass . getLocalMapq ( ) ) |
testUpdateProject2_1 ( ) { org . eclipse . sw360 . datahandler . entitlement . ProjectModerator moderator = org . mockito . Mockito . mock ( org . eclipse . sw360 . datahandler . entitlement . ProjectModerator . class ) ; org . eclipse . sw360 . datahandler . db . ProjectDatabaseHandler handler = new org . eclipse . sw... | org . junit . Assert . assertEquals ( RequestStatus . SUCCESS , status ) |
selectTextTest ( ) { org . eclipse . reddeer . workbench . impl . editor . TextEditor textEditor = org . eclipse . reddeer . workbench . test . editor . TextEditorTest . openJavaFile ( ) ; collapseTextInJavaFile ( ) ; textEditor . selectText ( "JavaClass" ) ; "<AssertPlaceHolder>" ; } getSelectedText ( ) { return org .... | org . junit . Assert . assertEquals ( "JavaClass" , textEditor . getSelectedText ( ) ) |
testGetJobIds ( ) { com . bc . calvalus . production . Production production = new com . bc . calvalus . production . Production ( "9A3F" , "Toasting" , null , null , false , new com . bc . calvalus . production . ProductionRequest ( "test" , "ewa" ) , new com . bc . calvalus . production . ProductionTest . MyWorkflowI... | org . junit . Assert . assertArrayEquals ( new java . lang . Object [ ] { new org . apache . hadoop . mapreduce . JobID ( "34627985F47" , 4 ) } , production . getJobIds ( ) ) |
breakInCaseTooFast ( ) { org . apache . ignite . internal . processors . cache . persistence . pagemem . PagesWriteSpeedBasedThrottle throttle = new org . apache . ignite . internal . processors . cache . persistence . pagemem . PagesWriteSpeedBasedThrottle ( pageMemory2g , null , stateChecker , log ) ; long time = thr... | org . junit . Assert . assertTrue ( ( time > 0 ) ) |
test2 ( ) { int agTest1 = agTest . listTest2 ( 2 ) ; "<AssertPlaceHolder>" ; } listTest2 ( java . lang . Long ) { return value ; } | org . junit . Assert . assertTrue ( ( agTest1 == 4 ) ) |
immediateValueIsAvailable ( ) { java . util . concurrent . atomic . AtomicReference < java . lang . String > val = new java . util . concurrent . atomic . AtomicReference ( ) ; context . immediateValue ( "hello" ) . consume ( val :: set ) ; "<AssertPlaceHolder>" ; } get ( ) { if ( ( value ) == null ) { synchronized ( t... | org . junit . Assert . assertThat ( val . get ( ) , org . hamcrest . Matchers . is ( "hello" ) ) |
validProperty ( ) { final java . util . Properties props = new org . apache . rya . streams . kafka . interactor . KafkaTopicPropertiesBuilder ( ) . setCleanupPolicy ( kafka . log . LogConfig . Compact ( ) ) . build ( ) ; final java . util . Properties expected = new java . util . Properties ( ) ; expected . setPropert... | org . junit . Assert . assertEquals ( expected , props ) |
testPut_AppendChild ( ) { com . googlecode . concurrenttrees . radix . ConcurrentRadixTree < java . lang . Integer > tree = new com . googlecode . concurrenttrees . radix . ConcurrentRadixTree < java . lang . Integer > ( getNodeFactory ( ) ) ; tree . put ( "FOO" , 1 ) ; tree . put ( "FOOBAR" , 2 ) ; java . lang . Strin... | org . junit . Assert . assertEquals ( expected , actual ) |
itIncludesAllTxactionsIfUneditedIsFalse ( ) { final com . wesabe . api . accounts . entities . TxactionList list = new com . wesabe . api . accounts . analytics . TxactionListBuilder ( ) . setAccounts ( new com . wesabe . api . accounts . entities . AccountList ( checking , savings ) ) . setUnedited ( false ) . setCurr... | org . junit . Assert . assertEquals ( 5 , list . getTotalCount ( ) ) |
testBufferEntityNoEntity ( ) { javax . ws . rs . core . Response r = new org . apache . cxf . jaxrs . impl . ResponseImpl ( 200 ) ; "<AssertPlaceHolder>" ; } bufferEntity ( ) { checkEntityIsClosed ( ) ; if ( ( ! ( entityBufferred ) ) && ( ( entity ) instanceof java . io . InputStream ) ) { try { java . io . InputStream... | org . junit . Assert . assertFalse ( r . bufferEntity ( ) ) |
givenJava8BiFunction_whenWorks_thenCorrect ( ) { java . util . function . BiFunction < java . lang . Integer , java . lang . Integer , java . lang . Integer > sum = ( num1 , num2 ) -> num1 + num2 ; int result = sum . apply ( 5 , 7 ) ; "<AssertPlaceHolder>" ; } apply ( int , int ) { return a / b ; } | org . junit . Assert . assertEquals ( 12 , result ) |
shouldReturnFalseIfClientHasNoMobile ( ) { client . addPhone ( com . practicalunittesting . chp05 . mockornot . NotMockingPhone2Test . STATIONARY_PHONE ) ; "<AssertPlaceHolder>" ; } hasMobile ( ) { for ( com . practicalunittesting . chp05 . mockornot . Phone2 phone : phones ) { if ( phone . isMobile ( ) ) { return true... | org . junit . Assert . assertFalse ( client . hasMobile ( ) ) |
shouldNotDependOnRawString ( ) { final com . github . scribejava . core . model . Token expected = new com . github . scribejava . core . model . OAuth1AccessToken ( "access" , "secret" , "raw_string" ) ; final com . github . scribejava . core . model . Token actual = new com . github . scribejava . core . model . OAut... | org . junit . Assert . assertEquals ( expected , actual ) |
testNullType ( ) { org . candlepin . model . Consumer c = new org . candlepin . model . Consumer ( "name" , org . candlepin . model . ConsumerTest . USER_NAME , owner , null ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( c ) |
testUnmarshal_LongId ( ) { com . jmethods . catatumbo . entities . LongId entity = new com . jmethods . catatumbo . entities . LongId ( ) ; entity . setField1 ( "Hello" ) ; entity . setId ( 90000L ) ; com . google . cloud . datastore . Entity nativeEntity = ( ( com . google . cloud . datastore . Entity ) ( com . jmetho... | org . junit . Assert . assertTrue ( entity . equals ( entity2 ) ) |
testGetGettersWithNullPropname ( ) { com . sap . core . odata . processor . core . jpa . access . data . JPAEntityParser resultParser = new com . sap . core . odata . processor . core . jpa . access . data . JPAEntityParser ( ) ; try { java . lang . Class < ? > [ ] pars = new java . lang . Class < ? > [ ] { java . lang... | org . junit . Assert . assertNull ( name ) |
testToTransform ( ) { com . dremio . dac . explore . model . TransformBase transform = new com . dremio . dac . proto . model . dataset . TransformExtract ( "source" , "new" , com . dremio . dac . util . DatasetsUtil . pattern ( "\\d+" , 0 , IndexType . INDEX ) , false ) ; com . dremio . dac . explore . model . Transfo... | org . junit . Assert . assertSame ( transform , actual ) |
testPatch ( ) { com . vmware . admiral . compute . container . HostPortProfileService . HostPortProfileState profile = createHostPortProfile ( ) ; profile = doPost ( profile , HostPortProfileService . FACTORY_LINK ) ; profile . startPort = new java . lang . Long ( "5000" ) ; com . vmware . admiral . compute . container... | org . junit . Assert . assertEquals ( profile . startPort , result . startPort ) |
getSasTokenReturnsSavedValue ( ) { new tests . unit . com . microsoft . azure . sdk . iot . device . auth . NonStrictExpectations ( ) { { mockSasToken . toString ( ) ; result = tests . unit . com . microsoft . azure . sdk . iot . device . auth . IotHubSasTokenHardwareAuthenticationProviderTest . expectedSasToken ; test... | org . junit . Assert . assertEquals ( mockSasToken . toString ( ) , actualSasToken ) |
lockShouldReturnTrueItTheTableIsNotLocked ( ) { initShouldNotCreateTheSchemaIfItAlreadyExists ( ) ; reset ( connection , metaData , statement , preparedStatement , resultSet ) ; expect ( connection . isClosed ( ) ) . andReturn ( false ) ; expect ( connection . prepareStatement ( ( ( "SELECT<sp>*<sp>FROM<sp>" + ( tableN... | org . junit . Assert . assertTrue ( lockAquired ) |
testAcceptInValidParameter2 ( ) { final org . openspotlight . graph . query . console . ConsoleState state = new org . openspotlight . graph . query . console . ConsoleState ( null ) ; state . setInput ( "add<sp>clear" ) ; "<AssertPlaceHolder>" ; } accept ( org . openspotlight . graph . query . console . ConsoleState )... | org . junit . Assert . assertThat ( command . accept ( state ) , org . hamcrest . core . Is . is ( false ) ) |
testGetPANIDZigBeeSuccess ( ) { org . mockito . Mockito . doReturn ( XBeeProtocol . ZIGBEE ) . when ( xbeeDevice ) . getXBeeProtocol ( ) ; org . mockito . Mockito . doReturn ( com . digi . xbee . api . GetPANIDTest . RESPONSE_OP ) . when ( xbeeDevice ) . getParameter ( com . digi . xbee . api . GetPANIDTest . PARAMETER... | org . junit . Assert . assertArrayEquals ( com . digi . xbee . api . GetPANIDTest . RESPONSE_OP , xbeeDevice . getPANID ( ) ) |
buscar ( ) { br . pro . delfino . drogaria . dao . CaixaDAO caixaDAO = new br . pro . delfino . drogaria . dao . CaixaDAO ( ) ; br . pro . delfino . drogaria . domain . Caixa caixa = caixaDAO . buscar ( new java . text . SimpleDateFormat ( "dd/MM/yyyy" ) . parse ( "13/12/2015" ) ) ; System . out . println ( caixa ) ; "... | org . junit . Assert . assertNull ( caixa ) |
testGetHistoriesForSubscriptionsAndBillingPeriodHistoryDelivered ( ) { final java . util . List < java . lang . Long > list = new java . util . ArrayList ( ) ; list . add ( java . lang . Long . valueOf ( 0 ) ) ; final java . util . List < org . oscm . domobjects . SubscriptionHistory > subscriptionHistories = new java ... | org . junit . Assert . assertEquals ( 1 , subscriptionHistories . size ( ) ) |
shouldRollbackTx ( ) { org . openkilda . model . Switch origSwitch = org . openkilda . model . Switch . builder ( ) . switchId ( org . openkilda . persistence . Neo4jTransactionManagerTest . TEST_SWITCH_ID ) . description ( "Some<sp>description" ) . build ( ) ; txManager . begin ( ) ; org . openkilda . persistence . Ne... | org . junit . Assert . assertEquals ( 0 , org . openkilda . persistence . Neo4jTransactionManagerTest . repository . findAll ( ) . size ( ) ) |
testCreateTemplates ( ) { org . hyperic . hq . measurement . server . session . MonitorableType monitorableType = templateManager . createMonitorableType ( "tomcat" , new org . hyperic . hq . product . ServerTypeInfo ( "tomcat<sp>server" , "1.0" 1 , "1.0" ) ) ; flushSession ( ) ; org . hyperic . hq . product . Measurem... | org . junit . Assert . assertEquals ( 2 , templateIds . length ) |
testZelfdeVersieReisdocument ( ) { maakReisdocument ( bestaandPersoon , false ) ; maakReisdocument ( nieuwPersoon , false ) ; final nl . bzk . migratiebrp . synchronisatie . dal . service . impl . delta . VergelijkerResultaat resultaat = vergelijker . vergelijk ( context , bestaandPersoon , nieuwPersoon ) ; "<AssertPla... | org . junit . Assert . assertTrue ( resultaat . isLeeg ( ) ) |
testAddCompositeFilter ( ) { final org . apache . logging . log4j . core . Filter filter1 = org . apache . logging . log4j . core . filter . ThresholdFilter . createFilter ( Level . ERROR , null , null ) ; final org . apache . logging . log4j . core . Filter filter2 = org . apache . logging . log4j . core . filter . Th... | org . junit . Assert . assertSame ( compositeFilter , filterable . getFilter ( ) ) |
testConditionalAcceptNextYear ( ) { com . graphhopper . reader . osm . conditional . Calendar cal = getCalendar ( 2014 , Calendar . MARCH , 10 ) ; com . graphhopper . reader . ConditionalTagInspector acceptor = new com . graphhopper . reader . osm . conditional . ConditionalOSMTagInspector ( cal , com . graphhopper . r... | org . junit . Assert . assertFalse ( acceptor . isPermittedWayConditionallyRestricted ( way ) ) |
testSerialization ( ) { org . jfree . data . function . PolynomialFunction2D f1 = new org . jfree . data . function . PolynomialFunction2D ( new double [ ] { 1.0 , 2.0 } ) ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out = new java . io . ObjectOutput... | org . junit . Assert . assertEquals ( f1 , f2 ) |
packTestAfterSerialized ( ) { java . io . ByteArrayOutputStream out = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutputStream serializer = new java . io . ObjectOutputStream ( out ) ; serializer . writeObject ( unpacked ) ; unpacked = null ; java . io . ObjectInputStream deserializer = new java . io ... | org . junit . Assert . assertEquals ( this . packed , new java . lang . String ( packed ) ) |
unbuiltRuleIsNotBuilt ( ) { com . facebook . buck . core . model . BuildTarget fakeBuildTarget = com . facebook . buck . core . model . BuildTargetFactory . newInstance ( "//foo:bar" ) ; com . facebook . buck . core . rules . impl . FakeBuildRule fakeBuildRule = new com . facebook . buck . core . rules . impl . FakeBui... | org . junit . Assert . assertThat ( fakeEngine . isRuleBuilt ( anotherFakeBuildTarget ) , org . hamcrest . Matchers . is ( false ) ) |
testToString ( ) { java . lang . String uri = "fake://nope" ; io . cereebro . core . Snitch fakeSnitch = io . cereebro . core . StaticSnitch . of ( java . net . URI . create ( uri ) ) ; io . cereebro . core . SnitchRegistry registry = io . cereebro . core . StaticSnitchRegistry . of ( fakeSnitch ) ; "<AssertPlaceHolder... | org . junit . Assert . assertTrue ( registry . toString ( ) . contains ( uri ) ) |
createDynamicModule ( ) { com . google . inject . Injector injector = com . google . inject . Guice . createInjector ( de . devsurf . injection . guice . scanner . StartupModule . create ( de . devsurf . injection . guice . scanner . asm . ASMClasspathScanner . class , de . devsurf . injection . guice . scanner . Packa... | org . junit . Assert . assertNotNull ( injector ) |
testLargeSquare ( ) { java . lang . String [ ] [ ] array = new java . lang . String [ ] [ ] { new java . lang . String [ ] { "16" 3 , "21" 1 , "51" 1 , "65" 3 , "12345678919293949596979899998979695949392918171615141312111121314151617182838485868788887868584838272625242322223242526273747576777767574736353433334353646566... | org . junit . Assert . assertEquals ( "123456789192939495969798999989796959493929181716151413121111213141516171828384858687888878685848382726252423222232425262737475767777675747363534333343536465666656454444555" , printCircular . printCircular ( array ) ) |
testClearArguments ( ) { final org . apache . oozie . fluentjob . api . action . SqoopActionBuilder builder = getBuilderInstance ( ) ; for ( final java . lang . String file : org . apache . oozie . fluentjob . api . action . TestSqoopActionBuilder . ARGS ) { builder . withArgument ( file ) ; } builder . clearArguments ... | org . junit . Assert . assertEquals ( 0 , argList . size ( ) ) |
shouldGetCredentialsFromJvmEnv ( ) { br . com . uol . pagseguro . api . credential . Credential expectedCredential = br . com . uol . pagseguro . api . credential . Credential . sellerCredential ( "email" , "token" ) ; when ( jvmEnvVariableCredentialProvider . getCredential ( ) ) . thenReturn ( expectedCredential ) ; b... | org . junit . Assert . assertEquals ( expectedCredential , credential ) |
testCreate ( ) { org . oscarehr . billing . CA . BC . model . TeleplanS00 entity = new org . oscarehr . billing . CA . BC . model . TeleplanS00 ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( entity ) ; dao . persist ( entity ) ; "<AssertPlaceHolder>" ; } getId ( ) { ... | org . junit . Assert . assertNotNull ( entity . getId ( ) ) |
testClassFinderCanFindClassesInJars ( ) { long counter = org . apache . hadoop . hbase . TestClassFinder . testCounter . incrementAndGet ( ) ; org . apache . hadoop . hbase . TestClassFinder . FileAndPath c1 = org . apache . hadoop . hbase . TestClassFinder . compileTestClass ( counter , "" , "c1" ) ; org . apache . ha... | org . junit . Assert . assertEquals ( 3 , allClasses . size ( ) ) |
assertGenerateKeyWithMultipleThreads ( ) { int threadNumber = ( java . lang . Runtime . getRuntime ( ) . availableProcessors ( ) ) << 1 ; java . util . concurrent . ExecutorService executor = java . util . concurrent . Executors . newFixedThreadPool ( threadNumber ) ; int taskNumber = threadNumber << 2 ; final org . ap... | org . junit . Assert . assertThat ( actual . size ( ) , org . hamcrest . CoreMatchers . is ( taskNumber ) ) |
testEqualsSelf ( ) { org . jfree . data . time . SimpleTimePeriod p = new org . jfree . data . time . SimpleTimePeriod ( new java . util . Date ( 1000L ) , new java . util . Date ( 1001L ) ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( obj == ( this ) ) { return true ; } if ( ! ( obj instanceof or... | org . junit . Assert . assertTrue ( p . equals ( p ) ) |
testShouldSendSuccessEmailIfSyncSummaryIsWarning ( ) { metadataSyncSummary . setImportReport ( new org . hisp . dhis . dxf2 . metadata . feedback . ImportReport ( ) ) ; metadataSyncSummary . getImportReport ( ) . setStatus ( Status . WARNING ) ; metadataSyncSummary . setMetadataVersion ( dataVersion ) ; org . hisp . dh... | org . junit . Assert . assertFalse ( status ) |
arrayShouldContainPartsCorrectly ( ) { multipart . addAll ( parts ) ; java . lang . Object [ ] partArray = ( ( java . lang . Object [ ] ) ( multipart . toArray ( ) ) ) ; "<AssertPlaceHolder>" ; } toArray ( ) { return parts . toArray ( ) ; } | org . junit . Assert . assertThat ( partArray , org . hamcrest . CoreMatchers . is ( parts . toArray ( ) ) ) |
g_V_foo_max ( ) { final org . apache . tinkerpop . gremlin . process . traversal . Traversal < org . apache . tinkerpop . gremlin . structure . Vertex , java . lang . Comparable > traversal = get_g_V_foo_max ( ) ; printTraversalForm ( traversal ) ; "<AssertPlaceHolder>" ; } hasNext ( ) { if ( ! ( this . locked ) ) this... | org . junit . Assert . assertFalse ( traversal . hasNext ( ) ) |
testMappingDelete ( ) { final java . lang . String path = "path/to/location" ; final java . lang . Boolean skipTrash = true ; final org . apache . oozie . fluentjob . api . action . Delete delete = new org . apache . oozie . fluentjob . api . action . Delete ( path , skipTrash ) ; final org . apache . oozie . fluentjob... | org . junit . Assert . assertEquals ( path , deleteJAXB . getPath ( ) ) |
testEqualsWithDifferentTypes ( ) { org . teiid . query . sql . symbol . Constant c1 = new org . teiid . query . sql . symbol . Constant ( "a" ) ; org . teiid . query . sql . symbol . Constant c2 = new org . teiid . query . sql . symbol . Constant ( "a" , org . teiid . core . types . DataTypeManager . DefaultDataClasses... | org . junit . Assert . assertEquals ( c1 , c2 ) |
testPageNumberOverflowOfGetContent ( ) { com . ewcms . publication . freemarker . directive . out . article . ContentDirectiveOutTest . ContentDirectiveOutMock out = new com . ewcms . publication . freemarker . directive . out . article . ContentDirectiveOutTest . ContentDirectiveOutMock ( ) ; out . setPageNumber ( 2 )... | org . junit . Assert . assertNull ( value ) |
exifOrientation5 ( ) { javax . imageio . ImageReader reader = javax . imageio . ImageIO . getImageReadersByFormatName ( "jpg" ) . next ( ) ; reader . setInput ( javax . imageio . ImageIO . createImageInputStream ( new java . io . File ( "src/test/resources/Exif/orientation_5.jpg" ) ) ) ; net . coobird . thumbnailator .... | org . junit . Assert . assertEquals ( net . coobird . thumbnailator . util . exif . Orientation . typeOf ( 5 ) , orientation ) |
testNew ( ) { final com . example . domain . Book newBook = new com . example . domain . Book ( com . example . annotation . method . PutTest . clientBookSequence . incrementAndGet ( ) , ( "book-" + ( java . lang . System . nanoTime ( ) ) ) ) ; javax . ws . rs . core . MediaType contentTypeMediaType = javax . ws . rs .... | org . junit . Assert . assertNotNull ( lastUpdate ) |
getSnappyShim_not_set ( ) { org . pentaho . hadoop . shim . spi . HadoopShim hadoopShim = new org . pentaho . hadoop . shim . spi . MockHadoopShim ( ) ; org . pentaho . hadoop . shim . HadoopConfiguration c = new org . pentaho . hadoop . shim . HadoopConfiguration ( org . apache . commons . vfs2 . VFS . getManager ( ) ... | org . junit . Assert . assertNotNull ( ex . getMessage ( ) ) |
testEncodeMongoDBDatabasesLowerCase ( ) { System . out . println ( ( ( com . telefonica . iot . cygnus . utils . CommonUtilsForTests . getTestTraceHead ( "[NGSICharsets.encodeMongoDBDatabase]" ) ) + "--------<sp>Lower<sp>case<sp>not<sp>accented<sp>characters<sp>are<sp>not<sp>encoded" ) ) ; java . lang . String in = "ab... | org . junit . Assert . assertEquals ( expected , out ) |
it ( ) { final com . rabbitmq . client . Consumer c = new com . rabbitmq . client . DefaultConsumer ( channel ) ; for ( int i = 0 ; i < ( com . rabbitmq . client . test . server . Bug19219Test . Q_COUNT ) ; i ++ ) { java . lang . String qName = channel . queueDeclare ( ) . getQueue ( ) ; channel . queueBind ( qName , "... | org . junit . Assert . assertTrue ( success ) |
UmlLinkType_InstanceVariableDeclaration_Composite_ArrayList ( ) { java . lang . String fromClass = "domain.direct.violating.DeclarationVariableInstance_GenericType_OneTypeParameter" ; java . lang . String toClass = "technology.direct.dao.ProfileDAO" ; java . lang . String fromAttribute = "pDao" ; boolean isComposite = ... | org . junit . Assert . assertTrue ( isUmlLinkDetectedViaClass ( fromClass , toClass , fromAttribute , isComposite , typeToFind ) ) |
shouldReturnNullIfGivenSplittedStringIsEmpty ( ) { final java . lang . String joinedString = com . qcadoo . mes . states . messages . util . MessagesUtil . joinArgs ( new java . lang . String [ ] { } ) ; "<AssertPlaceHolder>" ; } joinArgs ( java . lang . String [ ] ) { if ( org . apache . commons . lang3 . ArrayUtils .... | org . junit . Assert . assertNull ( joinedString ) |
testSerialization ( ) { org . jfree . chart . entity . PieSectionEntity e1 = new org . jfree . chart . entity . PieSectionEntity ( new java . awt . geom . Rectangle2D . Double ( 1.0 , 2.0 , 3.0 , 4.0 ) , new org . jfree . data . general . DefaultPieDataset ( ) , 0 , 1 , "Key" , "ToolTip" , "URL" ) ; org . jfree . chart... | org . junit . Assert . assertEquals ( c1 , c2 ) |
givenFeatureType_whenAddLocations_returnFeatureCollection ( ) { org . geotools . feature . DefaultFeatureCollection collection = new org . geotools . feature . DefaultFeatureCollection ( ) ; org . opengis . feature . simple . SimpleFeatureType CITY = com . baeldung . geotools . ShapeFile . createFeatureType ( ) ; com .... | org . junit . Assert . assertNotNull ( collection ) |
testEvaluateDouble ( ) { com . huawei . streaming . expression . MethodExpression methodExpression = new com . huawei . streaming . expression . MethodExpression ( new com . huawei . streaming . udfs . Abs ( null ) , "evaluate" , new com . huawei . streaming . expression . IExpression [ ] { new com . huawei . streaming... | org . junit . Assert . assertTrue ( value . equals ( 1.0 ) ) |
badJobsShouldBeCorrect ( ) { com . graphhopper . jsprit . core . problem . job . Job badJob = mock ( com . graphhopper . jsprit . core . problem . job . Job . class ) ; java . util . List < com . graphhopper . jsprit . core . problem . job . Job > badJobs = new java . util . ArrayList < com . graphhopper . jsprit . cor... | org . junit . Assert . assertEquals ( badJob , sol . getUnassignedJobs ( ) . iterator ( ) . next ( ) ) |
testNotStandard ( ) { st = mgr . getOrCreateByStatusCode ( 250 ) ; "<AssertPlaceHolder>" ; } getStatusCode ( ) { return 200 ; } | org . junit . Assert . assertEquals ( 250 , st . getStatusCode ( ) ) |
testConvertWithParameters ( ) { java . lang . String name = "name" ; java . lang . Integer priority = 2 ; org . lnu . is . domain . benefit . BenefitType context = new org . lnu . is . domain . benefit . BenefitType ( ) ; context . setName ( name ) ; context . setPriority ( priority ) ; java . lang . String expected = ... | org . junit . Assert . assertEquals ( expected , actualQuery ) |
testExecuteFlushIndexRequest ( ) { com . liferay . portal . search . engine . adapter . index . FlushIndexRequest flushIndexRequest = new com . liferay . portal . search . engine . adapter . index . FlushIndexRequest ( com . liferay . portal . search . elasticsearch6 . internal . search . engine . adapter . Elasticsear... | org . junit . Assert . assertEquals ( 0 , flushIndexResponse . getFailedShards ( ) ) |
testRoundTrip ( ) { java . io . ByteArrayOutputStream outStream = new java . io . ByteArrayOutputStream ( ) ; org . dataconservancy . packaging . gui . model . UserDefinedPropertyGroupJSONBuilder . serialize ( testGroups , outStream ) ; java . io . InputStream inStream = new java . io . ByteArrayInputStream ( outStream... | org . junit . Assert . assertEquals ( testGroups , roundTrippedGroups ) |
testLoadFromResource ( ) { org . apache . storm . flux . model . TopologyDef topologyDef = org . apache . storm . flux . parser . FluxParser . parseResource ( "/configs/kafka_test.yaml" , false , true , null , false ) ; org . apache . storm . Config conf = org . apache . storm . flux . FluxBuilder . buildConfig ( topol... | org . junit . Assert . assertNotNull ( topology ) |
renderConfluencePage_asciiDocWithTableWithAsciiDocCell_returnsConfluencePageWithTableWithAsciiDocCell ( ) { java . lang . String adocContent = "" + ( ( ( ( ( ( ( ( ( ( "|===\n" + "|<sp>A<sp>" ) + "|<sp>B\n" ) + "\n" ) + "|<sp>10<sp>" ) + "a|11\n" ) + "\n" ) + "*<sp>12<sp>\n" ) + "|<sp>10<sp>" 0 ) + "\n" ) + "|===" ) ; ... | org . junit . Assert . assertThat ( asciidocConfluencePage . content ( ) , org . hamcrest . Matchers . is ( expectedContent ) ) |
testScaleTo_4 ( ) { final int nbBuckets = 10 ; final int maxHeight = 10 ; final int nbEvents = 3 * nbBuckets ; final org . eclipse . tracecompass . tmf . ui . views . histogram . HistogramBucket [ ] expectedResult = new org . eclipse . tracecompass . tmf . ui . views . histogram . HistogramBucket [ ] { org . eclipse . ... | org . junit . Assert . assertArrayEquals ( expectedResult , result . fData ) |
test_get_mapping_configuration_by_source_context_id_success ( ) { java . util . List < org . ikasan . mapping . dao . MappingConfiguration > result = this . xaMappingConfigurationDao . getAllMappingConfigurations ( ) ; for ( org . ikasan . mapping . dao . MappingConfiguration mappingConfiguration : result ) { java . ut... | org . junit . Assert . assertEquals ( mappingConfiguration . getSourceContext ( ) , mappingConfigurationResult . getSourceContext ( ) ) |
testAll ( ) { java . lang . Object result = sut . duSomething ( ) ; "<AssertPlaceHolder>" ; verify ( dao ) . load ( ) ; } duSomething ( ) { dao . load ( ) ; return new java . lang . Object ( ) ; } | org . junit . Assert . assertNull ( result ) |
testScriptQuery ( ) { com . liferay . portal . search . script . Script script = null ; com . liferay . portal . search . query . ScriptQuery scriptQuery = com . liferay . portal . search . query . test . QueriesInstantiationTest . _queries . script ( script ) ; "<AssertPlaceHolder>" ; } script ( com . liferay . portal... | org . junit . Assert . assertNotNull ( scriptQuery ) |
testDecorateWhitespace ( ) { final org . springframework . roo . support . util . AnsiEscapeCode effect = org . springframework . roo . support . util . AnsiEscapeCode . values ( ) [ 0 ] ; "<AssertPlaceHolder>" ; } decorate ( java . lang . String , org . springframework . roo . support . util . AnsiEscapeCode [ ] ) { i... | org . junit . Assert . assertEquals ( ( ( ( effect . code ) + "<sp>" ) + ( AnsiEscapeCode . OFF . code ) ) , org . springframework . roo . support . util . AnsiEscapeCode . decorate ( "<sp>" , effect ) ) |
readStringTest ( ) { cn . hutool . core . io . resource . ClassPathResource resource = new cn . hutool . core . io . resource . ClassPathResource ( "test.properties" ) ; java . lang . String content = resource . readUtf8Str ( ) ; "<AssertPlaceHolder>" ; } isNotEmpty ( java . lang . CharSequence ) { return false == ( cn... | org . junit . Assert . assertTrue ( cn . hutool . core . util . StrUtil . isNotEmpty ( content ) ) |
testIgnoreUknownObject ( ) { final java . lang . Object object = this . ctx . getObjectHandlerRegistry ( ) . parseObject ( 35 , 1 , new org . opendaylight . protocol . pcep . spi . ObjectHeaderImpl ( false , false ) , null ) ; "<AssertPlaceHolder>" ; } getObjectHandlerRegistry ( ) { return this . objReg ; } | org . junit . Assert . assertNull ( object ) |
testExtractFields ( ) { java . util . Map < java . lang . String , java . lang . Object > expected = new java . util . HashMap ( ) ; expected . put ( "eventSource" , "Application" ) ; expected . put ( "eventID" , "1011" ) ; expected . put ( "iut" , "3" ) ; java . util . Map < java . lang . String , java . lang . Object... | org . junit . Assert . assertEquals ( expected , result ) |
testParseLong ( ) { final long [ ] tests = new long [ ] { Long . MIN_VALUE , Long . MAX_VALUE , - 1 , 0 , 1 , ( Long . MIN_VALUE ) + 1 , ( Long . MAX_VALUE ) - 1 } ; for ( long x : tests ) { try ( final java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; final java . io . DataOutputStre... | org . junit . Assert . assertEquals ( x , com . amazonaws . encryptionsdk . internal . PrimitivesParser . parseLong ( baos . toByteArray ( ) , 0 ) ) |
testDoMapConfig3 ( ) { System . out . println ( ( ( getTestTraceHead ( "[NGSIGroupingInterceptor.doMapConfig3]" ) ) + "--------<sp>A<sp>mapped<sp>ContextElement<sp>can<sp>be<sp>obtained<sp>from<sp>the<sp>Name<sp>Mappings" ) ) ; com . telefonica . iot . cygnus . interceptors . NGSINameMappingsInterceptor nameMappingsInt... | org . junit . Assert . assertTrue ( equals ) |
testEmailSend ( ) { java . util . List < com . mailjet . client . MJEasyClientTest . Person > recipients = new java . util . ArrayList < com . mailjet . client . MJEasyClientTest . Person > ( ) { { add ( new com . mailjet . client . MJEasyClientTest . Person ( "Guillaume" 1 , "Guillaume" ) ) ; add ( new com . mailjet .... | org . junit . Assert . assertTrue ( true ) |
testShouldReturnIndexSearcherFromLRUCache ( ) { org . neo4j . kernel . configuration . Config config = org . neo4j . kernel . configuration . Config . defaults ( ) ; dataSource = life . add ( getLuceneDataSource ( config ) ) ; org . neo4j . index . impl . lucene . explicit . IndexIdentifier identifier = org . neo4j . i... | org . junit . Assert . assertSame ( searcher , dataSource . getIndexSearcher ( identifier ) ) |
test ( ) { com . itextpdf . kernel . pdf . PdfDocument pdfDocument = new com . itextpdf . kernel . pdf . PdfDocument ( new com . itextpdf . kernel . pdf . PdfReader ( ( ( com . itextpdf . kernel . pdf . canvas . parser . FilteredEventListenerTest . sourceFolder ) + "test.pdf" ) ) ) ; final java . lang . String [ ] expe... | org . junit . Assert . assertEquals ( expectedText [ i ] , actualText ) |
addUserTest ( ) { com . ssm . maven . core . entity . User user = new com . ssm . maven . core . entity . User ( ) ; user . setUserName ( "" ) ; user . setPassword ( com . ssm . maven . core . util . MD5Util . MD5Encode ( "testuser" , "UTF-8" ) ) ; "<AssertPlaceHolder>" ; } addUser ( com . ssm . maven . core . entity .... | org . junit . Assert . assertTrue ( ( ( userDao . addUser ( user ) ) > 0 ) ) |
getTaskClassLoaderDisabledSupportCodeChange ( ) { java . lang . ClassLoader defaultClassLoader = new org . jini . rio . boot . CodeChangeClassLoader ( new java . net . URL [ ] { } , getClass ( ) . getClassLoader ( ) ) ; boolean supportCodeChange = false ; int maxClassLoaders = 2 ; org . jini . rio . boot . CodeChangeCl... | org . junit . Assert . assertFalse ( codeChangeClassLoadersManager . isSupportCodeChange ( ) ) |
testGetObject ( ) { final java . lang . String testPath = "/foo" ; when ( mockSession . getNode ( testPath ) ) . thenReturn ( mockNode ) ; when ( mockJcrTools . findOrCreateNode ( mockSession , "/foo" , org . fcrepo . kernel . modeshape . services . NT_FOLDER , org . fcrepo . kernel . modeshape . services . NT_FOLDER )... | org . junit . Assert . assertEquals ( mockNode , getJcrNode ( actual ) ) |
deveGerarXMLDeAcordoComOPadraoEstabelecido ( ) { final java . lang . String xmlEsperado = "<NFNotaInfoDestinatario><CNPJ>12345678901234</CNPJ><xNome>F7HL85M9v7jW5lX4Z9V7sF3kshuj967gj4uACEmpmVQgM9yYeQAgaY5EcSfR</xNome><enderDest><xLgr>NKwaAJ5ZJ49aQYmqBvxMhBzkGUqvtXnqusGEtjDzKCXPGwrEZCS8LGKHyBbV</xLgr><nro>11mzXHR8rZTgfE... | org . junit . Assert . assertEquals ( xmlEsperado , com . fincatto . documentofiscal . nfe310 . FabricaDeObjetosFake . getNFNotaInfoDestinatario ( ) . toString ( ) ) |
processorStateTestPushSameElementTwice ( ) { com . itextpdf . svg . processors . impl . ProcessorState testProcessorState = new com . itextpdf . svg . processors . impl . ProcessorState ( ) ; com . itextpdf . svg . renderers . ISvgNodeRenderer rendererOne = new com . itextpdf . svg . dummy . renderers . impl . DummySvg... | org . junit . Assert . assertTrue ( result ) |
getDatumAanvang ( ) { final nl . bzk . brp . bijhouding . bericht . model . DatumElement datumAanvang = new nl . bzk . brp . bijhouding . bericht . model . DatumElement ( 20170101 ) ; final nl . bzk . brp . bijhouding . bericht . model . OnderzoekGroepElement onderzoekGroepElement = nl . bzk . brp . bijhouding . berich... | org . junit . Assert . assertEquals ( datumAanvang , onderzoekGroepElement . getDatumAanvang ( ) ) |
testToDeployConfiguration_versionIsEmpty ( ) { when ( preferences . get ( eq ( DeployPreferences . PREF_CUSTOM_VERSION ) , anyString ( ) ) ) . thenReturn ( "" ) ; com . google . cloud . tools . appengine . configuration . DeployConfiguration configuration = com . google . cloud . tools . eclipse . appengine . deploy . ... | org . junit . Assert . assertNull ( configuration . getVersion ( ) ) |
findServiceByGroups ( ) { java . util . List < io . robe . admin . hibernate . entity . Service > services = dao . findServiceByGroups ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return queue . size ( ) ; } | org . junit . Assert . assertTrue ( ( ( services . size ( ) ) > 0 ) ) |
listInstall ( ) { net . sourceforge . seqware . pipeline . runner . PluginRunner runner = new net . sourceforge . seqware . pipeline . runner . PluginRunner ( ) ; java . lang . String [ ] args = new java . lang . String [ ] { "-p" , "net.sourceforge.seqware.pipeline.plugins.BundleManager" , "--" , "--list-install" } ; ... | org . junit . Assert . assertTrue ( true ) |
injectionByType ( ) { "<AssertPlaceHolder>" ; org . apache . openejb . cdi . StatefulConversationScopedTOMEE1138Test . doTest ( conversation ) ; } | org . junit . Assert . assertNotNull ( conversation ) |
testGetCustomConverter_IsEmpty ( ) { converters . clear ( ) ; java . lang . Class result = ccc . getCustomConverter ( com . github . dozermapper . core . converters . Integer . class , com . github . dozermapper . core . converters . Double . class , cache ) ; "<AssertPlaceHolder>" ; } getCustomConverter ( java . lang ... | org . junit . Assert . assertEquals ( null , result ) |
testPresent ( ) { final com . adobe . acs . commons . httpcache . store . jcr . impl . visitor . mock . RootNodeMockFactory . Settings settings = new com . adobe . acs . commons . httpcache . store . jcr . impl . visitor . mock . RootNodeMockFactory . Settings ( ) ; settings . setEntryNodeCount ( 10 ) ; final javax . j... | org . junit . Assert . assertNotNull ( visitor . getCacheContentIfPresent ( ) ) |
testGetDeprecatedCalls ( ) { System . out . println ( "getDeprecatedCalls" ) ; com . rhythm . pb . swagr . SwagrProtos . SwagrOptionsPB . Builder opts = SwagrProtos . SwagrOptionsPB . newBuilder ( ) ; opts . setService ( "ALL" ) ; opts . setSystemId ( 1 ) ; java . util . List < com . rhythm . pb . swagr . SwagrProtos .... | org . junit . Assert . assertTrue ( ( ! ( result . isEmpty ( ) ) ) ) |
testException01 ( ) { java . lang . String source = "$f1<sp>==<sp>$f2" ; com . ebay . cloud . cms . expression . IExpression expr = getEngine ( ) . compile ( source ) ; com . ebay . cloud . cms . expression . entity . SampleEntity entity = new com . ebay . cloud . cms . expression . entity . SampleEntity ( ) ; entity .... | org . junit . Assert . assertEquals ( true , result ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.