input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testVerschillendeDatums5 ( ) { java . util . List < nl . bzk . brp . model . validatie . Melding > meldingen = brby0527 . executeer ( null , maakPersoonMetPlaats ( maakGemeente ( ( ( short ) ( 24 ) ) , "gemeente" , 19920101 , 200020101 ) ) , maakActie ( "id.actie1" , 19920101 , 200020101 ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , meldingen . size ( ) )
readProjectAllAsRoleAdmin ( ) { for ( org . apache . kylin . metadata . project . ProjectInstance project : org . apache . ranger . authorization . kylin . authorizer . RangerKylinAuthorizerTest . uuid2Projects . values ( ) ) { boolean result = aclEvaluate . hasProjectReadPermission ( project ) ; "<AssertPlaceHolder>" ; } }
org . junit . Assert . assertTrue ( result )
menuShouldHaveItems ( ) { final java . util . List < lcmc . common . ui . utils . UpdatableItem > items = blockDevMenu . getPulldownMenu ( blockDevInfoStub ) ; verify ( menuItemStub , times ( 6 ) ) . predicate ( ( ( lcmc . common . domain . Predicate ) ( anyObject ( ) ) ) ) ; verify ( menuItemStub , times ( 19 ) ) . visiblePredicate ( ( ( lcmc . common . domain . VisiblePredicate ) ( anyObject ( ) ) ) ) ; verify ( menuItemStub , times ( 19 ) ) . enablePredicate ( ( ( lcmc . common . domain . EnablePredicate ) ( anyObject ( ) ) ) ) ; verify ( menuItemStub , times ( 19 ) ) . addAction ( ( ( lcmc . common . ui . utils . MenuAction ) ( anyObject ( ) ) ) ) ; verify ( menuStub , times ( 1 ) ) . enablePredicate ( ( ( lcmc . common . domain . EnablePredicate ) ( anyObject ( ) ) ) ) ; verify ( menuStub , times ( 1 ) ) . onUpdate ( ( ( java . lang . Runnable ) ( anyObject ( ) ) ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return hosts . size ( ) ; }
org . junit . Assert . assertEquals ( 20 , items . size ( ) )
testLoadSaveFalse ( ) { final org . pentaho . reporting . engine . classic . extensions . datasources . kettle . KettleDataFactory kettleDataFactory = new org . pentaho . reporting . engine . classic . extensions . datasources . kettle . KettleDataFactory ( ) ; org . pentaho . reporting . engine . classic . extensions . datasources . kettle . KettleTransFromFileProducer value = new org . pentaho . reporting . engine . classic . extensions . datasources . kettle . KettleTransFromFileProducer ( org . pentaho . reporting . engine . classic . extensions . datasources . kettle . Prd5056Test . QUERY , org . pentaho . reporting . engine . classic . extensions . datasources . kettle . Prd5056Test . STEP ) ; value . setStopOnError ( false ) ; kettleDataFactory . setQuery ( "test" , value ) ; final org . pentaho . reporting . engine . classic . extensions . datasources . kettle . KettleDataFactory e2 = ( ( org . pentaho . reporting . engine . classic . extensions . datasources . kettle . KettleDataFactory ) ( org . pentaho . reporting . engine . classic . core . testsupport . DataSourceTestBase . loadAndSaveOnReport ( kettleDataFactory ) ) ) ; org . pentaho . reporting . engine . classic . extensions . datasources . kettle . KettleTransFromFileProducer test = ( ( org . pentaho . reporting . engine . classic . extensions . datasources . kettle . KettleTransFromFileProducer ) ( e2 . getQuery ( "test" ) ) ) ; "<AssertPlaceHolder>" ; } isStopOnError ( ) { return stopOnError ; }
org . junit . Assert . assertFalse ( test . isStopOnError ( ) )
testFixAbsoluteFilePath ( ) { java . lang . String actualObj = m . fixFilePath ( "/projects/topic_17576/iur-service-client/target/classes" ) ; "<AssertPlaceHolder>" ; } fixFilePath ( java . lang . String ) { return fixFilePath ( new java . io . File ( path ) ) ; }
org . junit . Assert . assertEquals ( "/projects/topic_17576/iur-service-client/target/classes" , actualObj )
basicCase ( ) { org . eclipse . collections . impl . block . function . CaseFunction < java . lang . Integer , java . lang . Integer > function = new org . eclipse . collections . impl . block . function . CaseFunction ( ) ; function . addCase ( ( ignored ) -> true , org . eclipse . collections . impl . block . factory . Functions . getIntegerPassThru ( ) ) ; java . lang . Integer fortyTwo = 42 ; "<AssertPlaceHolder>" ; } valueOf ( java . lang . Integer ) { return org . eclipse . collections . impl . list . Interval . fromTo ( ( - 1 ) , ( - object ) ) ; }
org . junit . Assert . assertEquals ( fortyTwo , function . valueOf ( fortyTwo ) )
testHandleContentAdapter ( ) { org . eclipse . emf . ecore . EPackage root = createExample ( ) ; org . eclipse . emf . ecore . util . EContentAdapter eContentAdapter = new org . eclipse . emf . ecore . util . EContentAdapter ( ) ; root . eAdapters ( ) . add ( eContentAdapter ) ; org . eclipse . xtext . parser . antlr . IReferableElementsUnloader . GenericUnloader genericUnloader = new org . eclipse . xtext . parser . antlr . IReferableElementsUnloader . GenericUnloader ( ) ; try { genericUnloader . unloadRoot ( root ) ; } catch ( java . lang . StackOverflowError e ) { e . printStackTrace ( ) ; org . junit . Assert . fail ( "Unload<sp>does<sp>not<sp>cope<sp>with<sp>contentAdpaters" ) ; } "<AssertPlaceHolder>" ; } size ( ) { return content . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , root . eAdapters ( ) . size ( ) )
givenArrayOfPrimitiveType_whenCopiedViaSystemsArrayCopy_thenSuccessful ( ) { int [ ] array = new int [ ] { 23 , 43 , 55 } ; int [ ] copiedArray = new int [ 3 ] ; java . lang . System . arraycopy ( array , 0 , copiedArray , 0 , 3 ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertArrayEquals ( copiedArray , array )
testConvertToDatumLong ( ) { long expected = 123456789L ; org . talend . daikon . avro . converter . AvroConverter < java . lang . Object , java . lang . Object > converter = org . talend . codegen . converter . IdentityConverter . getInstance ( ) ; long actual = ( ( java . lang . Long ) ( converter . convertToDatum ( expected ) ) ) ; "<AssertPlaceHolder>" ; } convertToDatum ( java . lang . String ) { return new java . math . BigDecimal ( value ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testResolveParentRelativeVolumePathWithNoParent ( ) { java . lang . String relativePath = io . fabric8 . maven . docker . util . PathTestUtil . join ( io . fabric8 . maven . docker . util . VolumeBindingUtilTest . SEP , ( ( io . fabric8 . maven . docker . util . PathTestUtil . DOT ) + ( io . fabric8 . maven . docker . util . PathTestUtil . DOT ) ) , ( ( io . fabric8 . maven . docker . util . PathTestUtil . DOT ) + ( io . fabric8 . maven . docker . util . PathTestUtil . DOT ) ) , "rel" ) ; java . lang . String volumeString = java . lang . String . format ( BIND_STRING_FMT , relativePath , io . fabric8 . maven . docker . util . VolumeBindingUtilTest . CONTAINER_PATH ) ; java . io . File baseDir = io . fabric8 . maven . docker . util . PathTestUtil . getFirstDirectory ( io . fabric8 . maven . docker . util . VolumeBindingUtilTest . ABS_BASEDIR ) ; java . lang . String relativizedVolumeString = io . fabric8 . maven . docker . util . VolumeBindingUtil . resolveRelativeVolumeBinding ( baseDir , volumeString ) ; java . lang . String expectedBindingString = java . lang . String . format ( BIND_STRING_FMT , new java . io . File ( baseDir . getParent ( ) , io . fabric8 . maven . docker . util . PathTestUtil . stripLeadingPeriod ( io . fabric8 . maven . docker . util . VolumeBindingUtilTest . RELATIVE_PATH ) ) , io . fabric8 . maven . docker . util . VolumeBindingUtilTest . CONTAINER_PATH ) ; "<AssertPlaceHolder>" ; } stripLeadingPeriod ( java . lang . String ) { if ( path . startsWith ( io . fabric8 . maven . docker . util . PathTestUtil . DOT ) ) { return path . substring ( 1 ) ; } return path ; }
org . junit . Assert . assertEquals ( expectedBindingString , relativizedVolumeString )
testExtract_invalidXml_returnsEmptyMap ( ) { java . util . Map < java . lang . String , java . lang . String > ret = xmlFieldExtractor . extract ( new java . io . ByteArrayInputStream ( "this<sp>is<sp>not<sp>XML" . getBytes ( com . google . api . ads . common . lib . utils . UTF_8 ) ) , new java . lang . String [ ] { "trigger" } ) ; "<AssertPlaceHolder>" ; verify ( logger , times ( 1 ) ) . warn ( contains ( "XML" ) , isA ( org . xml . sax . SAXException . class ) ) ; } extract ( org . w3c . dom . Document , java . lang . String ) { javax . xml . xpath . XPathExpression expr = xpathSupplier . get ( ) . compile ( ( "//" + field ) ) ; org . w3c . dom . NodeList nl = ( ( org . w3c . dom . NodeList ) ( expr . evaluate ( doc , XPathConstants . NODESET ) ) ) ; if ( ( nl . getLength ( ) ) > 0 ) { return nl . item ( 0 ) . getTextContent ( ) ; } return null ; }
org . junit . Assert . assertEquals ( 0 , ret . size ( ) )
testCreateComplexJobTriggerDayOfMonthRecurrences ( ) { "<AssertPlaceHolder>" ; } createComplexJobTriggerDayOfMonthRecurrences ( ) { return new org . pentaho . platform . plugin . services . importexport . exportManifest . bindings . ComplexJobTrigger . DayOfMonthRecurrences ( ) ; }
org . junit . Assert . assertNotNull ( factory . createComplexJobTriggerDayOfMonthRecurrences ( ) )
testValidateTable_pk_with_one_column ( ) { final com . restlet . sqlimport . report . Report report = new com . restlet . sqlimport . report . Report ( ) ; final com . restlet . sqlimport . validation . DatabaseValidator databaseValidator = new com . restlet . sqlimport . validation . DatabaseValidator ( report ) ; final com . restlet . sqlimport . model . sql . Database database = new com . restlet . sqlimport . model . sql . Database ( ) ; final com . restlet . sqlimport . model . sql . Table table = new com . restlet . sqlimport . model . sql . Table ( ) ; database . getTables ( ) . add ( table ) ; table . getPrimaryKey ( ) . getColumnNames ( ) . add ( "c1" ) ; databaseValidator . validateDatabase ( database ) ; "<AssertPlaceHolder>" ; } getReportLines ( ) { return reportLines ; }
org . junit . Assert . assertTrue ( report . getReportLines ( ) . isEmpty ( ) )
testTransformAnyParameters ( ) { org . hawkular . apm . api . model . config . instrumentation . jvm . JVM ir = new org . hawkular . apm . api . model . config . instrumentation . jvm . JVM ( ) ; org . hawkular . apm . api . model . config . instrumentation . jvm . FreeFormAction im = new org . hawkular . apm . api . model . config . instrumentation . jvm . FreeFormAction ( ) ; ir . setRuleName ( org . hawkular . apm . instrumenter . rules . TransformerTest . TEST_RULE ) ; ir . setClassName ( org . hawkular . apm . instrumenter . rules . TransformerTest . TEST_CLASS ) ; ir . setMethodName ( org . hawkular . apm . instrumenter . rules . TransformerTest . TEST_METHOD ) ; ir . getParameterTypes ( ) . add ( org . hawkular . apm . instrumenter . rules . TransformerTest . ANY_PARAMETERS ) ; ir . setLocation ( "ENTRY" ) ; ir . getActions ( ) . add ( im ) ; im . setAction ( "COMPILE\r\n\r\n" 1 ) ; org . hawkular . apm . api . model . config . instrumentation . Instrumentation in = new org . hawkular . apm . api . model . config . instrumentation . Instrumentation ( ) ; in . getRules ( ) . add ( ir ) ; org . hawkular . apm . instrumenter . rules . RuleTransformer transformer = new org . hawkular . apm . instrumenter . rules . RuleTransformer ( ) ; java . lang . String transformed = transformer . transform ( "test" , in , null ) ; java . lang . String expected = ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "COMPILE\r\n\r\n" + "RULE<sp>test(1)<sp>" ) + ( org . hawkular . apm . instrumenter . rules . TransformerTest . TEST_RULE ) ) + "\r\nCLASS<sp>" ) + ( org . hawkular . apm . instrumenter . rules . TransformerTest . TEST_CLASS ) ) + "\r\n" ) + "METHOD<sp>" ) + ( org . hawkular . apm . instrumenter . rules . TransformerTest . TEST_METHOD ) ) + "\r\n" ) + "COMPILE\r\n\r\n" 0 ) + ( org . hawkular . apm . instrumenter . RuleHelper . class . getName ( ) ) ) + "\r\n" ) + "AT<sp>ENTRY\r\nIF<sp>TRUE\r\n" ) + "DO\r\n<sp>" ) + ( im . getAction ( ) ) ) + "\r\n" ) + "ENDRULE\r\n\r\n" ; "<AssertPlaceHolder>" ; } getAction ( ) { return action ; }
org . junit . Assert . assertEquals ( expected , transformed )
testChooseOneTransportFirst ( org . apache . servicecomb . core . Transport , org . apache . servicecomb . core . Transport ) { new mockit . Expectations ( ) { { t1 . getOrder ( ) ; result = 1 ; t1 . canInit ( ) ; result = true ; t2 . getOrder ( ) ; result = 2 ; } } ; org . apache . servicecomb . core . transport . TransportManager manager = new org . apache . servicecomb . core . transport . TransportManager ( ) ; java . util . List < org . apache . servicecomb . core . Transport > group = java . util . Arrays . asList ( t1 , t2 ) ; "<AssertPlaceHolder>" ; } chooseOneTransport ( java . util . List ) { group . sort ( java . util . Comparator . comparingInt ( Transport :: getOrder ) ) ; for ( org . apache . servicecomb . core . Transport transport : group ) { if ( transport . canInit ( ) ) { org . apache . servicecomb . core . transport . TransportManager . LOGGER . info ( "choose<sp>{}<sp>for<sp>{}." , transport . getClass ( ) . getName ( ) , transport . getName ( ) ) ; return transport ; } } throw new org . apache . servicecomb . foundation . common . exceptions . ServiceCombException ( java . lang . String . format ( "all<sp>transport<sp>named<sp>%s<sp>refused<sp>to<sp>init." , group . get ( 0 ) . getName ( ) ) ) ; }
org . junit . Assert . assertEquals ( t1 , manager . chooseOneTransport ( group ) )
shouldSeeCmisTypesAsJcrTypes ( ) { javax . jcr . nodetype . NodeTypeManager manager = getSession ( ) . getWorkspace ( ) . getNodeTypeManager ( ) ; javax . jcr . nodetype . NodeTypeIterator it = manager . getNodeType ( "nt:file" ) . getDeclaredSubtypes ( ) ; while ( it . hasNext ( ) ) { javax . jcr . nodetype . NodeType nodeType = it . nextNodeType ( ) ; "<AssertPlaceHolder>" ; } } nextNodeType ( ) { ( position ) ++ ; return iterator . next ( ) ; }
org . junit . Assert . assertTrue ( ( nodeType != null ) )
testUpdateMediaInfoTop250 ( ) { com . moviejukebox . plugin . FilmwebPluginTest . LOG . info ( "testUpdateMediaInfoTop250" ) ; com . moviejukebox . model . Movie movie = new com . moviejukebox . model . Movie ( ) ; movie . setId ( FilmwebPlugin . FILMWEB_PLUGIN_ID , "http://www.filmweb.pl/Ojciec.Chrzestny" ) ; filmwebPlugin . updateMediaInfo ( movie , movie . getId ( FilmwebPlugin . FILMWEB_PLUGIN_ID ) ) ; "<AssertPlaceHolder>" ; } getTop250 ( ) { return top250 ; }
org . junit . Assert . assertEquals ( 3 , movie . getTop250 ( ) )
testListGetStringColumn ( ) { org . jdesktop . swingx . decorator . ComponentAdapterTest . JXListT list = new org . jdesktop . swingx . decorator . ComponentAdapterTest . JXListT ( org . jdesktop . test . AncientSwingTeam . createNamedColorListModel ( ) ) ; list . setCellRenderer ( new org . jdesktop . swingx . renderer . DefaultListRenderer ( sv ) ) ; java . lang . String text = sv . getString ( list . getElementAt ( 2 ) ) ; org . jdesktop . swingx . decorator . ComponentAdapter adapter = list . getComponentAdapter ( 2 ) ; "<AssertPlaceHolder>" ; } getString ( java . lang . Object ) { if ( value instanceof org . jdesktop . swingx . demos . search . Contributor ) { org . jdesktop . swingx . demos . search . Contributor c = ( ( org . jdesktop . swingx . demos . search . Contributor ) ( value ) ) ; return ( ( ( ( ( c . getFirstName ( ) ) + "<sp>" ) + ( c . getLastName ( ) ) ) + "<sp>(" ) + ( c . getMerits ( ) ) ) + ")" ; } return StringValues . TO_STRING . getString ( value ) ; }
org . junit . Assert . assertEquals ( text , adapter . getString ( 0 ) )
getAllPatientIdentifierTypes_shouldNotReturnNullExcludingRetired ( ) { "<AssertPlaceHolder>" ; } getAllPatientIdentifierTypes ( boolean ) { org . hibernate . Criteria criteria = sessionFactory . getCurrentSession ( ) . createCriteria ( org . openmrs . PatientIdentifierType . class ) ; if ( ! includeRetired ) { criteria . add ( org . hibernate . criterion . Restrictions . eq ( "retired" , false ) ) ; } else { criteria . addOrder ( org . hibernate . criterion . Order . asc ( "retired" ) ) ; } criteria . addOrder ( org . hibernate . criterion . Order . desc ( "required" ) ) ; criteria . addOrder ( org . hibernate . criterion . Order . asc ( "name" ) ) ; criteria . addOrder ( org . hibernate . criterion . Order . asc ( "patientIdentifierTypeId" ) ) ; return criteria . list ( ) ; }
org . junit . Assert . assertNotNull ( dao . getAllPatientIdentifierTypes ( false ) )
whenCrossParameterValidationWithInvalidParameters_thenCorrectNumberOfVoilations ( ) { org . baeldung . javaxval . methodvalidation . model . ReservationManagement object = new org . baeldung . javaxval . methodvalidation . model . ReservationManagement ( ) ; java . lang . reflect . Method method = org . baeldung . javaxval . methodvalidation . model . ReservationManagement . class . getMethod ( "createReservation" , java . time . LocalDate . class , java . time . LocalDate . class , org . baeldung . javaxval . methodvalidation . model . Customer . class ) ; java . lang . Object [ ] parameterValues = new java . lang . Object [ ] { java . time . LocalDate . now ( ) , java . time . LocalDate . now ( ) , new org . baeldung . javaxval . methodvalidation . model . Customer ( "John" , "Doe" ) } ; java . util . Set < javax . validation . ConstraintViolation < org . baeldung . javaxval . methodvalidation . model . ReservationManagement > > violations = executableValidator . validateParameters ( object , method , parameterValues ) ; "<AssertPlaceHolder>" ; } size ( ) { return elements . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , violations . size ( ) )
testFewBytesToLong ( ) { java . nio . ByteBuffer bb = java . nio . ByteBuffer . wrap ( new byte [ ] { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 0 , 0 } ) ; long l = bb . getLong ( ) ; "<AssertPlaceHolder>" ; } getLong ( ) { if ( ( ( data . limit ( ) ) - ( data . position ( ) ) ) == 8 ) return data . duplicate ( ) . getLong ( ) ; byte [ ] b = data . array ( ) ; long l = 0 ; for ( int i = ( b . length ) - 1 ; i >= 0 ; i -- ) l |= ( ( b [ i ] ) & 255L ) << ( 8 * ( ( ( b . length ) - 1 ) - i ) ) ; return l ; }
org . junit . Assert . assertEquals ( 1 , l )
testReferentialConstraintNull ( ) { org . apache . olingo . odata2 . api . edm . provider . Association association = new org . apache . olingo . odata2 . api . edm . provider . Association ( ) . setName ( "association" ) ; org . apache . olingo . odata2 . api . edm . EdmAssociation edmAssociation = new org . apache . olingo . odata2 . core . edm . provider . EdmAssociationImplProv ( null , association , "ns" ) ; "<AssertPlaceHolder>" ; } getReferentialConstraint ( ) { return referentialConstraint ; }
org . junit . Assert . assertNull ( edmAssociation . getReferentialConstraint ( ) )
testMinWidthPassesMinWidthToCondition ( ) { com . eclipsesource . tabris . passepartout . Condition condition = com . eclipsesource . tabris . passepartout . PassePartout . minWidth ( com . eclipsesource . tabris . passepartout . PassePartout . px ( 100 ) ) ; boolean complies = condition . compliesWith ( new com . eclipsesource . tabris . passepartout . internal . UIEnvironmentImpl ( new com . eclipsesource . tabris . passepartout . Bounds ( 10 , 10 , 110 , 0 ) , mock ( com . eclipsesource . tabris . passepartout . Bounds . class ) , 16 ) ) ; "<AssertPlaceHolder>" ; } px ( int ) { return new com . eclipsesource . tabris . passepartout . internal . unit . Pixel ( value ) ; }
org . junit . Assert . assertTrue ( complies )
userImplShouldCaptureRolesFromConstructor ( ) { org . jboss . errai . security . shared . api . identity . User user = new org . jboss . errai . security . shared . api . identity . UserImpl ( "test" , java . util . Arrays . asList ( new org . jboss . errai . security . shared . api . RoleImpl ( "a" ) , new org . jboss . errai . security . shared . api . RoleImpl ( "b" ) , new org . jboss . errai . security . shared . api . RoleImpl ( "c" ) ) ) ; "<AssertPlaceHolder>" ; } getRoles ( ) { return new java . util . HashSet < org . jboss . errai . security . shared . api . Role > ( java . util . Arrays . asList ( new org . jboss . errai . security . shared . api . RoleImpl ( "admin" ) ) ) ; }
org . junit . Assert . assertTrue ( user . getRoles ( ) . contains ( new org . jboss . errai . security . shared . api . RoleImpl ( "a" ) ) )
shouldMineCountDecreaseByOne_whenMineIsDestroyed ( ) { placeMineUpFromSapper ( ) ; int minesCount = board . getMinesCount ( ) ; board . useMineDetectorToGivenDirection ( Direction . UP ) ; int minesCountWhenMineDestroyed = board . getMinesCount ( ) ; "<AssertPlaceHolder>" ; } getMinesCount ( ) { return getMines ( ) . size ( ) ; }
org . junit . Assert . assertEquals ( minesCount , ( minesCountWhenMineDestroyed + 1 ) )
testMalformedDateHeaderIsIgnored ( ) { final org . apache . hc . core5 . http . Header [ ] headers = new org . apache . hc . core5 . http . Header [ ] { new org . apache . hc . core5 . http . message . BasicHeader ( "Date" , "asdf" ) } ; entry = new org . apache . hc . client5 . http . cache . HttpCacheEntry ( new java . util . Date ( ) , new java . util . Date ( ) , org . apache . hc . core5 . http . HttpStatus . SC_OK , headers , mockResource ) ; "<AssertPlaceHolder>" ; } getDate ( ) { return date ; }
org . junit . Assert . assertNull ( entry . getDate ( ) )
testGivenMTLBuyWithOneLOSellWhenQuantityOfMTLOrderIsBigger ( ) { vn . com . vndirect . exchangesimulator . model . NewOrderSingle order = vn . com . vndirect . exchangesimulator . matching . OrderFactory . createLOSell ( "VND" , 1000 , 13000 ) ; sm . push ( order ) ; vn . com . vndirect . exchangesimulator . model . NewOrderSingle mtlOrder = vn . com . vndirect . exchangesimulator . matching . OrderFactory . createMTLBuy ( "VND" , 1200 ) ; sm . push ( mtlOrder ) ; java . util . List < vn . com . vndirect . exchangesimulator . model . ExecutionReport > reports = sm . getLastMatches ( ) ; "<AssertPlaceHolder>" ; verifyReportFillReport ( reports . get ( 0 ) , '2' , 1000 , 13000 ) ; verifyReportFillReport ( reports . get ( 1 ) , '2' , 1000 , 13000 ) ; verifyMTLOrderAfterMatching ( mtlOrder , 200 , 13100 ) ; } size ( ) { return queue . size ( ) ; }
org . junit . Assert . assertEquals ( 3 , reports . size ( ) )
testParseZeroX ( ) { java . lang . String source = ( ( ( ( ( "{0" + ( getDecimalCharacter ( ) ) ) + "0;<sp>-1" ) + ( getDecimalCharacter ( ) ) ) + "4343;<sp>1" ) + ( getDecimalCharacter ( ) ) ) + "6333}" ; org . hipparchus . linear . ArrayRealVector expected = new org . hipparchus . linear . ArrayRealVector ( new double [ ] { 0.0 , - 1.4343 , 1.6333 } ) ; org . hipparchus . linear . ArrayRealVector actual = realVectorFormat . parse ( source ) ; "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { java . text . ParsePosition parsePosition = new java . text . ParsePosition ( 0 ) ; org . hipparchus . geometry . euclidean . twod . Vector2D result = parse ( source , parsePosition ) ; if ( ( parsePosition . getIndex ( ) ) == 0 ) { throw new org . hipparchus . exception . MathIllegalStateException ( org . hipparchus . exception . LocalizedCoreFormats . CANNOT_PARSE_AS_TYPE , source , parsePosition . getErrorIndex ( ) , org . hipparchus . geometry . euclidean . twod . Vector2D . class ) ; } return result ; }
org . junit . Assert . assertEquals ( expected , actual )
testIsRegionOverflowToDiskWhenEvictionActionIsOverflowToDisk ( ) { final com . gemstone . gemfire . cache . Region mockRegion = mockContext . mock ( com . gemstone . gemfire . cache . Region . class , "Region" ) ; final com . gemstone . gemfire . cache . RegionAttributes mockRegionAttributes = mockContext . mock ( com . gemstone . gemfire . cache . RegionAttributes . class , "RegionAttributes" ) ; final com . gemstone . gemfire . cache . EvictionAttributes mockEvictionAttributes = mockContext . mock ( com . gemstone . gemfire . cache . EvictionAttributes . class , "EvictionAttributes" ) ; mockContext . checking ( new org . jmock . Expectations ( ) { { exactly ( 2 ) . of ( mockRegion ) . getAttributes ( ) ; will ( returnValue ( mockRegionAttributes ) ) ; exactly ( 2 ) . of ( mockRegionAttributes ) . getEvictionAttributes ( ) ; will ( returnValue ( mockEvictionAttributes ) ) ; oneOf ( mockEvictionAttributes ) . getAction ( ) ; will ( returnValue ( EvictionAction . OVERFLOW_TO_DISK ) ) ; } } ) ; final com . gemstone . gemfire . management . internal . cli . functions . DescribeDiskStoreFunction function = createDescribeDiskStoreFunction ( null ) ; "<AssertPlaceHolder>" ; } isOverflowToDisk ( com . gemstone . gemfire . cache . Region ) { return ( ( region . getAttributes ( ) . getEvictionAttributes ( ) ) != null ) && ( EvictionAction . OVERFLOW_TO_DISK . equals ( region . getAttributes ( ) . getEvictionAttributes ( ) . getAction ( ) ) ) ; }
org . junit . Assert . assertTrue ( function . isOverflowToDisk ( mockRegion ) )
testCurrent ( ) { tec . units . ri . spi . DimensionalModel model = tec . units . ri . spi . DimensionalModel . current ( ) ; "<AssertPlaceHolder>" ; } current ( ) { return tec . units . ri . spi . DimensionalModel . currentModel ; }
org . junit . Assert . assertNotNull ( model )
distributePorts_GivenNoPortsOnRightSide_NothingHappens ( ) { org . eclipse . elk . alg . layered . graph . LNode [ ] leftNodes = addNodesToLayer ( 2 , makeLayer ( getGraph ( ) ) ) ; org . eclipse . elk . alg . layered . graph . LNode middleNode = addNodeToLayer ( makeLayer ( getGraph ( ) ) ) ; addNodesToLayer ( 2 , makeLayer ( getGraph ( ) ) ) ; eastWestEdgeFromTo ( leftNodes [ 0 ] , middleNode ) ; eastWestEdgeFromTo ( leftNodes [ 1 ] , middleNode ) ; java . util . List < org . eclipse . elk . alg . layered . graph . LPort > expectedPortOrderRightNode = portsOrderedAs ( middleNode , 0 , 1 ) ; setUpDistributor ( ) ; portDist . distributePortsWhileSweeping ( graph . toNodeArray ( ) , 1 , false ) ; "<AssertPlaceHolder>" ; } getPorts ( ) { if ( ( ports ) == null ) { ports = new org . eclipse . emf . ecore . util . EObjectContainmentWithInverseEList < org . eclipse . elk . graph . ElkPort > ( org . eclipse . elk . graph . ElkPort . class , this , org . eclipse . elk . graph . ElkGraphPackage . ELK_NODE__PORTS , org . eclipse . elk . graph . ElkGraphPackage . ELK_PORT__PARENT ) ; } return ports ; }
org . junit . Assert . assertThat ( middleNode . getPorts ( ) , org . hamcrest . CoreMatchers . is ( expectedPortOrderRightNode ) )
shouldReturnFalseWhenChildDiseaseReportedIsNotMalaria ( ) { boolean didRuleSucceed = rule . apply ( new org . ei . drishti . util . SafeMap ( mapOf ( "reportChildDisease" , "diarrhea_dehydration" ) ) ) ; "<AssertPlaceHolder>" ; } mapOf ( Key , Value ) { java . util . HashMap < Key , Value > normalMap = new java . util . HashMap ( ) ; normalMap . put ( key , value ) ; return normalMap ; }
org . junit . Assert . assertFalse ( didRuleSucceed )
toJSON_axisWithStops_StopsCorrectlySerialized ( ) { com . vaadin . addon . charts . model . YAxis yaxis = new com . vaadin . addon . charts . model . YAxis ( ) ; com . vaadin . addon . charts . model . Stop stop1 = new com . vaadin . addon . charts . model . Stop ( 0.1F , com . vaadin . addon . charts . model . style . SolidColor . GREEN ) ; com . vaadin . addon . charts . model . Stop stop2 = new com . vaadin . addon . charts . model . Stop ( 0.5F , com . vaadin . addon . charts . model . style . SolidColor . YELLOW ) ; com . vaadin . addon . charts . model . Stop stop3 = new com . vaadin . addon . charts . model . Stop ( 0.9F , com . vaadin . addon . charts . model . style . SolidColor . RED ) ; yaxis . setStops ( stop1 , stop2 , stop3 ) ; java . lang . String expected = "{\"stops\":[[0.1,\"#008000\"],[0.5,\"#FFFF00\"],[0.9,\"#FF0000\"]]}" ; "<AssertPlaceHolder>" ; } toJSON ( com . vaadin . addon . charts . model . AbstractConfigurationObject ) { try { return com . vaadin . addon . charts . util . ChartSerialization . jsonWriter . writeValueAsString ( object ) ; } catch ( com . fasterxml . jackson . core . JsonProcessingException e ) { e . printStackTrace ( ) ; throw new java . lang . RuntimeException ( ( "Error<sp>while<sp>serializing<sp>" + ( object . getClass ( ) . getSimpleName ( ) ) ) , e ) ; } }
org . junit . Assert . assertEquals ( expected , toJSON ( yaxis ) )
testStudyGraphPresentationModel ( ) { org . drugis . addis . presentation . TreatmentDefinitionsGraphModel model = d_wizard . getRawAlternativesGraph ( ) ; d_wizard . getIndicationModel ( ) . setValue ( org . drugis . addis . ExampleData . buildIndicationDepression ( ) ) ; d_wizard . getOutcomeMeasureModel ( ) . setValue ( org . drugis . addis . ExampleData . buildEndpointHamd ( ) ) ; d_wizard . rebuildRawAlternativesGraph ( ) ; java . util . List < org . drugis . addis . entities . treatment . TreatmentDefinition > drugs = new java . util . ArrayList < org . drugis . addis . entities . treatment . TreatmentDefinition > ( ) ; drugs . add ( d_fluoxSet ) ; drugs . add ( d_paroxSet ) ; drugs . add ( d_sertrSet ) ; "<AssertPlaceHolder>" ; } getDefinitions ( ) { return d_definitions ; }
org . junit . Assert . assertEquals ( drugs , model . getDefinitions ( ) )
simpleLookupForMissingKeyUsingDefaultValue ( ) { org . constretto . ConstrettoConfiguration constrettoConfiguration = prepareTests ( ) ; java . lang . Integer value = constrettoConfiguration . evaluateTo ( "missing.key" , Integer . MIN_VALUE ) ; "<AssertPlaceHolder>" ; } evaluateTo ( java . lang . Class , java . lang . String ) { return processAndConvert ( targetClass , expression ) ; }
org . junit . Assert . assertEquals ( new java . lang . Integer ( Integer . MIN_VALUE ) , value )
listTest ( ) { org . easycassandra . bean . model . Person person = getPerson ( ) ; person . setId ( 1L ) ; dao . insert ( person ) ; "<AssertPlaceHolder>" ; } listAll ( ) { return persistence . findAll ( baseClass ) ; }
org . junit . Assert . assertTrue ( ( ( dao . listAll ( ) . size ( ) ) > 0 ) )
signAndVerify2 ( ) { java . lang . String str = "wx2421b1c4370ec43b<sp><sp>JSAPI<sp>10000100<sp>1add1a30ac87aa2db72f57a2375d8fec<sp>http://wxpay.wxutil.com/pub_v2/pay/notify.v2.php<sp>oUpF8uMuAJO_M2pxb1Q9zNjWeS6o<sp>1415659990<sp>14.23.150.211<sp>1<sp>JSAPI<sp>0CB01533B8C1EF103065174F50BCA001" ; byte [ ] data = cn . hutool . core . util . StrUtil . utf8Bytes ( str ) ; cn . hutool . crypto . asymmetric . Sign sign = cn . hutool . crypto . SecureUtil . sign ( SignAlgorithm . MD5withRSA ) ; byte [ ] signed = sign . sign ( data ) ; boolean verify = sign . verify ( data , signed ) ; "<AssertPlaceHolder>" ; } verify ( java . lang . String , java . lang . String ) { if ( cn . hutool . core . util . StrUtil . isNotBlank ( userInputCode ) ) { return cn . hutool . core . util . StrUtil . equalsIgnoreCase ( code , userInputCode ) ; } return false ; }
org . junit . Assert . assertTrue ( verify )
testValueValid ( ) { java . util . Set < javax . validation . ConstraintViolation < org . kie . workbench . common . stunner . cm . definition . property . diagram . Version > > violations = this . validator . validate ( tested ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return violations . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( violations . isEmpty ( ) )
testGetSQLShareHistory ( ) { classUnderTest . setSQLShareHistory ( true ) ; "<AssertPlaceHolder>" ; } getSQLShareHistory ( ) { return _sqlShareHistory ; }
org . junit . Assert . assertEquals ( true , classUnderTest . getSQLShareHistory ( ) )
testGetAllOperationsFor_withEmtpyMessage ( ) { java . lang . String json = "{<sp>\"head\"<sp>:<sp>{},<sp>\"operations\"<sp>:<sp>[]<sp>}" ; org . eclipse . rap . rwt . internal . protocol . ClientMessage message = new org . eclipse . rap . rwt . internal . protocol . ClientMessage ( org . eclipse . rap . json . JsonObject . readFrom ( json ) ) ; java . util . List < org . eclipse . rap . rwt . internal . protocol . Operation > operations = message . getAllOperationsFor ( "w5" ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( ( childCollections . size ( ) ) == 0 ) && ( ( cheatsheets . size ( ) ) == 0 ) ; }
org . junit . Assert . assertTrue ( operations . isEmpty ( ) )
readWriteSquareAndTriangle ( ) { java . lang . String inputString = de . javagl . obj . TestObjWriter . readResourceAsString ( "/squareAndTriangle.obj" ) ; de . javagl . obj . Obj obj = de . javagl . obj . ObjReader . read ( new java . io . ByteArrayInputStream ( inputString . getBytes ( ) ) ) ; java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; de . javagl . obj . ObjWriter . write ( obj , baos ) ; java . lang . String outputString = new java . lang . String ( baos . toByteArray ( ) ) ; "<AssertPlaceHolder>" ; } write ( de . javagl . obj . ReadableObj , java . io . OutputStream ) { java . io . OutputStreamWriter outputStreamWriter = new java . io . OutputStreamWriter ( outputStream ) ; de . javagl . obj . ObjWriter . write ( input , outputStreamWriter ) ; }
org . junit . Assert . assertEquals ( inputString , outputString )
testIsSerializable ( ) { java . lang . String item = "foo" ; combo . add ( item ) ; org . eclipse . swt . widgets . Combo deserializedCombo = serializeAndDeserialize ( combo ) ; "<AssertPlaceHolder>" ; } getItem ( int ) { checkWidget ( ) ; if ( ! ( hasChildren ) ) { throw new java . lang . IllegalArgumentException ( "GridItem<sp>has<sp>no<sp>children!" ) ; } return getItemData ( ) . getChildren ( ) . get ( index ) ; }
org . junit . Assert . assertEquals ( item , deserializedCombo . getItem ( 0 ) )
testToConnectSupportsOptionalValues ( ) { com . blueapron . connect . protobuf . ProtobufData protobufData = new com . blueapron . connect . protobuf . ProtobufData ( com . blueapron . connect . protobuf . NestedTestProtoOuterClass . NestedTestProto . class , LEGACY_NAME ) ; org . apache . kafka . connect . data . Schema schema = SchemaBuilder . OPTIONAL_BOOLEAN_SCHEMA . schema ( ) ; "<AssertPlaceHolder>" ; } toConnectData ( java . lang . String , byte [ ] ) { if ( ( ( protobufData ) == null ) || ( value == null ) ) { return org . apache . kafka . connect . data . SchemaAndValue . NULL ; } return protobufData . toConnectData ( value ) ; }
org . junit . Assert . assertNull ( protobufData . toConnectData ( schema , null ) )
testIntronic ( ) { java . lang . String [ ] legacyVariantStrings = new java . lang . String [ ] { "XXX:IVS3+3del" , "XXX:IVS3-3delT" , "XXX:IVS3-3delTCT" , "XXX:IVS3-3del3" } ; for ( java . lang . String legacyVariantString : legacyVariantStrings ) { de . charite . compbio . jannovar . hgvs . legacy . LegacyVariant variant = driver . parseLegacyChangeString ( legacyVariantString ) ; "<AssertPlaceHolder>" ; } } toLegacyString ( ) { return com . google . common . base . Joiner . on ( "" ) . join ( location . toLegacyString ( ) , "del" , deletedSeq . toHGVSString ( ) ) ; }
org . junit . Assert . assertEquals ( legacyVariantString , variant . toLegacyString ( ) )
testDataSources_1 ( ) { java . util . Collection < java . lang . String > names = org . teiid . runtime . TestEmbeddedServerAdmin . admin . getDataSourceNames ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return size ; }
org . junit . Assert . assertEquals ( 0 , names . size ( ) )
testMethod ( ) { final boolean [ ] result = new boolean [ ] { false } ; result [ 0 ] = new edu . rice . pcdp . await . TestAwait1c ( ) . run ( ) ; "<AssertPlaceHolder>" ; } run ( ) { edu . rice . pcdp . PCDP . finish ( ( ) -> { final int acc0 = 1 ; async ( ( ) -> { int acc1 = 2 ; async ( ( ) -> { int acc2 = 3 ; async ( ( ) -> { int acc3 = ( acc0 + acc1 ) + acc2 ; res = acc3 == 6 ; } ) ; } ) ; } ) ; } ) ; return res ; }
org . junit . Assert . assertEquals ( true , result [ 0 ] )
constructorSucceedOn5Levels ( ) { final java . util . Map < java . lang . String , java . lang . Object > rawMap = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) { { put ( tests . unit . com . microsoft . azure . sdk . iot . deps . twin . TwinCollectionTest . VALID_KEY_NAME , tests . unit . com . microsoft . azure . sdk . iot . deps . twin . TwinCollectionTest . VALID_VALUE_NAME ) ; put ( "MaxSpeed" , new com . microsoft . azure . sdk . iot . deps . twin . TwinCollection ( ) { { putFinal ( "Value" , 500.0 ) ; putFinal ( "NewValue" , 300.0 ) ; putFinal ( "Inner1" , new com . microsoft . azure . sdk . iot . deps . twin . TwinCollection ( ) { { putFinal ( "Inner2" , new com . microsoft . azure . sdk . iot . deps . twin . TwinCollection ( ) { { putFinal ( "Inner3" , new com . microsoft . azure . sdk . iot . deps . twin . TwinCollection ( ) { { putFinal ( "Inner4" , "FinalInnerValue" ) ; } } ) ; } } ) ; } } ) ; } } ) ; } } ; com . microsoft . azure . sdk . iot . deps . twin . TwinCollection twinCollection = mockit . Deencapsulation . invoke ( com . microsoft . azure . sdk . iot . deps . twin . TwinCollection . class , "createFromRawCollection" , rawMap ) ; "<AssertPlaceHolder>" ; } putFinal ( java . lang . String , java . lang . Object ) { if ( ( key == null ) || ( key . isEmpty ( ) ) ) { if ( ( ! ( key . equals ( com . microsoft . azure . sdk . iot . deps . twin . TwinCollection . VERSION_TAG ) ) ) && ( ! ( key . equals ( com . microsoft . azure . sdk . iot . deps . twin . TwinCollection . METADATA_TAG ) ) ) ) { com . microsoft . azure . sdk . iot . deps . serializer . ParserUtility . validateMap ( this , com . microsoft . azure . sdk . iot . deps . twin . TwinCollection . MAX_TWIN_LEVEL , true ) ; } return last ; }
org . junit . Assert . assertNotNull ( twinCollection )
testGetConsumer ( ) { com . t1t . apim . rest . KongConsumer cons = createTestConsumer ( ) ; com . t1t . apim . rest . KongConsumer regCons = com . t1t . apim . rest . KongClientIntegrationTest . kongClient . createConsumer ( cons ) ; "<AssertPlaceHolder>" ; com . t1t . apim . rest . KongClientIntegrationTest . kongClient . deleteConsumer ( regCons . getId ( ) ) ; } createConsumer ( java . lang . String ) { return httpClient . createConsumer ( new com . t1t . apim . gateway . rest . KongConsumer ( ) . withUsername ( userUniqueName ) . withCustomId ( userUniqueName ) ) ; }
org . junit . Assert . assertNotNull ( regCons )
rejectKeysValues ( ) { com . gs . collections . api . multimap . ImmutableMultimap < java . lang . String , java . lang . String > multimap = this . < java . lang . String , java . lang . String > classUnderTest ( ) . newWith ( "One" , "1" ) . newWith ( "Two" , "2" ) ; com . gs . collections . api . multimap . ImmutableMultimap < java . lang . String , java . lang . String > rejectedMultimap = multimap . rejectKeysValues ( ( key , value ) -> ( "Two" . equals ( key ) ) && ( "2" . equals ( value ) ) ) ; "<AssertPlaceHolder>" ; } classUnderTest ( ) { return SortedBags . immutable . empty ( ) ; }
org . junit . Assert . assertEquals ( this . classUnderTest ( ) . newWith ( "One" , "1" ) , rejectedMultimap )
testGetFactType ( ) { final org . drools . workbench . screens . guided . dtable . client . wizard . column . plugins . commons . PatternWrapper pattern = mock ( org . drools . workbench . screens . guided . dtable . client . wizard . column . plugins . commons . PatternWrapper . class ) ; final java . lang . String expectedFactType = "FactType" ; doReturn ( expectedFactType ) . when ( pattern ) . getFactType ( ) ; doReturn ( pattern ) . when ( plugin ) . patternWrapper ( ) ; final java . lang . String factType = plugin . getFactType ( ) ; "<AssertPlaceHolder>" ; } getFactType ( ) { final java . lang . String factType = headerMetaData . getPatternsByColumnNumber ( org . kie . soup . commons . validation . PortablePreconditions . checkNotNull ( "columnIndex" , columnIndex ) ) . getFactType ( ) ; return factType ; }
org . junit . Assert . assertEquals ( expectedFactType , factType )
testDefault ( ) { "<AssertPlaceHolder>" ; } favoritesCollection ( ) { return ch . cyberduck . core . FolderBookmarkCollection . FAVORITES_COLLECTION ; }
org . junit . Assert . assertNotNull ( ch . cyberduck . core . FolderBookmarkCollection . favoritesCollection ( ) )
testGetMaskAll ( ) { long inMask = 127 ; org . sagebionetworks . repo . model . table . QueryOptions options = new org . sagebionetworks . repo . model . table . QueryOptions ( ) . withMask ( inMask ) ; long mask = options . getPartMask ( ) ; "<AssertPlaceHolder>" ; } getPartMask ( ) { long partMask = 0 ; if ( this . runQuery ) { partMask = partMask | ( org . sagebionetworks . repo . model . table . QueryOptions . BUNDLE_MASK_QUERY_RESULTS ) ; } if ( this . runCount ) { partMask = partMask | ( org . sagebionetworks . repo . model . table . QueryOptions . BUNDLE_MASK_QUERY_COUNT ) ; } if ( this . returnSelectColumns ) { partMask = partMask | ( org . sagebionetworks . repo . model . table . QueryOptions . BUNDLE_MASK_QUERY_SELECT_COLUMNS ) ; } if ( this . returnMaxRowsPerPage ) { partMask = partMask | ( org . sagebionetworks . repo . model . table . QueryOptions . BUNDLE_MASK_QUERY_MAX_ROWS_PER_PAGE ) ; } if ( this . returnColumnModels ) { partMask = partMask | ( org . sagebionetworks . repo . model . table . QueryOptions . BUNDLE_MASK_QUERY_COLUMN_MODELS ) ; } if ( this . returnFacets ) { partMask = partMask | ( org . sagebionetworks . repo . model . table . QueryOptions . BUNDLE_MASK_QUERY_FACETS ) ; } if ( this . runSumFileSizes ) { partMask = partMask | ( org . sagebionetworks . repo . model . table . QueryOptions . BUNDLE_MASK_SUM_FILE_SIZES ) ; } return partMask ; }
org . junit . Assert . assertEquals ( inMask , mask )
testBug1864222 ( ) { org . jfree . data . time . TimeSeries s = new org . jfree . data . time . TimeSeries ( "S" ) ; s . add ( new org . jfree . data . time . Day ( 19 , 8 , 2005 ) , 1 ) ; s . add ( new org . jfree . data . time . Day ( 31 , 1 , 2006 ) , 1 ) ; boolean pass = true ; try { s . createCopy ( new org . jfree . data . time . Day ( 1 , 12 , 2005 ) , new org . jfree . data . time . Day ( 18 , 1 , 2006 ) ) ; } catch ( java . lang . CloneNotSupportedException e ) { pass = false ; } "<AssertPlaceHolder>" ; } add ( double , double , java . lang . Comparable , java . lang . Comparable ) { add ( new java . lang . Double ( mean ) , new java . lang . Double ( standardDeviation ) , rowKey , columnKey ) ; }
org . junit . Assert . assertTrue ( pass )
testGetMessage ( ) { java . lang . String url = "http://localhost/wiki/index.php" ; net . sourceforge . jwbf . core . actions . GetPage testee = new net . sourceforge . jwbf . core . actions . GetPage ( url ) ; net . sourceforge . jwbf . core . actions . util . HttpAction expected = net . sourceforge . jwbf . core . actions . RequestBuilder . of ( "http://localhost/wiki/index.php" ) . buildGet ( ) ; "<AssertPlaceHolder>" ; } getNextMessage ( ) { return msg ; }
org . junit . Assert . assertEquals ( expected , testee . getNextMessage ( ) )
reusesIdWhenHeaderPresent ( ) { java . lang . String headerId = java . util . UUID . randomUUID ( ) . toString ( ) ; when ( request . getHeader ( configuration . getHeaderName ( ) ) ) . thenReturn ( headerId ) ; requestTrackerServletFilter . doFilter ( request , response , chain ) ; java . lang . String idInLog = org . slf4j . MDC . get ( configuration . getMdcKey ( ) ) ; "<AssertPlaceHolder>" ; } getMdcKey ( ) { return mdcKey ; }
org . junit . Assert . assertThat ( idInLog , org . hamcrest . CoreMatchers . equalTo ( headerId ) )
discardComponentUnknown ( ) { try { deleteAt ( aResourceURI ( "<exception>" ) , org . silverpeas . admin . web . PersonalComponentEntity . class ) ; org . junit . Assert . fail ( "A<sp>user<sp>shouldn't<sp>discard<sp>an<sp>unknown<sp>component" ) ; } catch ( final com . sun . jersey . api . client . UniformInterfaceException ex ) { final int receivedStatus = ex . getResponse ( ) . getStatus ( ) ; final int unauthorized = Status . NOT_FOUND . getStatusCode ( ) ; "<AssertPlaceHolder>" ; } } is ( T ) { return java . util . Objects . equals ( this . value , value ) ; }
org . junit . Assert . assertThat ( receivedStatus , org . hamcrest . Matchers . is ( unauthorized ) )
testConcat_1 ( ) { lombok . val row1 = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 1 , 1 , 1 , 1 } , new long [ ] { 1 , 4 } ) ; lombok . val row2 = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 2 , 2 , 2 , 2 } , new long [ ] { 1 , 4 } ) ; lombok . val row3 = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 3 , 3 , 3 , 3 } , new long [ ] { 1 , 4 } ) ; lombok . val exp = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 1 , 1 , 1 , 1 , 2 , 2 , 2 , 2 , 3 , 3 , 3 , 3 } , new int [ ] { 3 , 4 } ) ; lombok . val op = org . nd4j . linalg . api . ops . DynamicCustomOp . builder ( "concat" ) . addInputs ( row1 , row2 , row3 ) . addIntegerArguments ( 0 ) . build ( ) ; org . nd4j . linalg . factory . Nd4j . getExecutioner ( ) . exec ( op ) ; lombok . val z = op . getOutputArgument ( 0 ) ; "<AssertPlaceHolder>" ; } getOutputArgument ( int ) { return null ; }
org . junit . Assert . assertEquals ( exp , z )
mustIdentifyAsPrefix ( ) { com . offbynull . actors . address . Address parent = com . offbynull . actors . address . Address . of ( "one" , "two" ) ; com . offbynull . actors . address . Address fixture = com . offbynull . actors . address . Address . of ( "one" , "two" , "three" ) ; "<AssertPlaceHolder>" ; } isPrefixOf ( com . offbynull . actors . address . Address ) { org . apache . commons . lang3 . Validate . notNull ( other ) ; if ( ( other . addressElements . size ( ) ) < ( addressElements . size ( ) ) ) { return false ; } return other . addressElements . subList ( 0 , addressElements . size ( ) ) . equals ( addressElements ) ; }
org . junit . Assert . assertTrue ( parent . isPrefixOf ( fixture ) )
createBodyShouldReturnTheShortMessageIfTheCommandIsAMessageRequest ( ) { org . jsmpp . bean . DeliverSm command = new org . jsmpp . bean . DeliverSm ( ) ; command . setShortMessage ( "Hello<sp>SMPP<sp>world!" . getBytes ( ) ) ; message = new org . apache . camel . component . smpp . SmppMessage ( camelContext , command , new org . apache . camel . component . smpp . SmppConfiguration ( ) ) ; "<AssertPlaceHolder>" ; } createBody ( ) { if ( ( webServiceMessage ) != null ) { return webServiceMessage . getPayloadSource ( ) ; } return null ; }
org . junit . Assert . assertEquals ( "Hello<sp>SMPP<sp>world!" , message . createBody ( ) )
testDeleteChangedProperty ( ) { theirRoot . getTree ( "/" ) . setProperty ( "a" , org . apache . jackrabbit . oak . plugins . commit . DefaultThreeWayConflictHandlerOursTest . THEIR_VALUE ) ; ourRoot . getTree ( "/" ) . removeProperty ( "a" ) ; theirRoot . commit ( ) ; ourRoot . commit ( ) ; org . apache . jackrabbit . oak . api . PropertyState p = ourRoot . getTree ( "/" ) . getProperty ( "a" ) ; "<AssertPlaceHolder>" ; } getProperty ( java . lang . String ) { return getWrappedNodeBuilder ( ) . getProperty ( name ) ; }
org . junit . Assert . assertNull ( p )
testFeatureType2Creation ( ) { reload ( false ) ; final org . opengis . feature . FeatureType refType = org . geotoolkit . db . postgres . PostgresComplexTypeTest . FTYPE_COMPLEX2 ; store . createFeatureType ( refType ) ; "<AssertPlaceHolder>" ; final org . opengis . util . GenericName name = store . getNames ( ) . iterator ( ) . next ( ) ; final org . opengis . feature . FeatureType created = store . getFeatureType ( name . toString ( ) ) ; lazyCompare ( refType , created ) ; } getNames ( ) { return new java . lang . String [ ] { org . geotoolkit . pending . demo . filter . customfunction . IMRFunctionFactory . DENSITY } ; }
org . junit . Assert . assertEquals ( 1 , store . getNames ( ) . size ( ) )
oneEmail ( ) { ru . otus . l42 . LotteryMachine machine = new ru . otus . l42 . LotteryMachine ( 2 ) ; java . util . List < java . lang . String > result = machine . draw ( java . util . Collections . singletonList ( "test" ) ) ; "<AssertPlaceHolder>" ; } size ( ) { throw new java . lang . UnsupportedOperationException ( ) ; }
org . junit . Assert . assertEquals ( 1 , result . size ( ) )
testAutoAssignForEmptyResult ( ) { java . util . Map < java . lang . String , java . util . List < java . lang . String > > hostGroups = singletonMap ( "group1" , asList ( "host1" ) ) ; org . springframework . test . util . ReflectionTestUtils . setField ( clusterCommands , "hostGroups" , hostGroups ) ; when ( context . getFocusValue ( ) ) . thenReturn ( "blueprint" ) ; when ( client . recommendAssignments ( "blueprint" ) ) . thenReturn ( new java . util . HashMap < java . lang . String , java . util . List < java . lang . String > > ( ) ) ; clusterCommands . autoAssign ( ) ; java . util . Map < java . lang . String , java . util . List < java . lang . String > > result = ( ( java . util . Map < java . lang . String , java . util . List < java . lang . String > > ) ( org . springframework . test . util . ReflectionTestUtils . getField ( clusterCommands , "hostGroups" ) ) ) ; "<AssertPlaceHolder>" ; } autoAssign ( ) { try { java . util . Map < java . lang . String , java . util . List < java . lang . String > > assignments = client . recommendAssignments ( context . getFocusValue ( ) ) ; if ( ! ( assignments . isEmpty ( ) ) ) { hostGroups = assignments ; context . setHint ( Hints . CREATE_CLUSTER ) ; } return showAssignments ( ) ; } catch ( java . lang . Exception e ) { return "Assigning<sp>hosts<sp>failed,<sp>cause:<sp>" + ( e . getMessage ( ) ) ; } }
org . junit . Assert . assertEquals ( hostGroups , result )
testTemplate ( ) { org . kefirsf . bb . conf . Code code = new org . kefirsf . bb . conf . Code ( ) ; org . kefirsf . bb . conf . Template template = createTemplate ( ) ; code . setTemplate ( template ) ; "<AssertPlaceHolder>" ; } getTemplate ( ) { return template ; }
org . junit . Assert . assertEquals ( template , code . getTemplate ( ) )
testRenewerParam ( ) { final org . apache . hadoop . hdfs . web . resources . RenewerParam p = new org . apache . hadoop . hdfs . web . resources . RenewerParam ( RenewerParam . DEFAULT ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return sb . toString ( ) ; }
org . junit . Assert . assertEquals ( null , p . getValue ( ) )
testIsCacheServerUsingDiskStoreWhenUsingDefaultDiskStore ( ) { final com . gemstone . gemfire . cache . server . CacheServer mockCacheServer = mockContext . mock ( com . gemstone . gemfire . cache . server . CacheServer . class , "CacheServer" ) ; final com . gemstone . gemfire . cache . server . ClientSubscriptionConfig mockClientSubscriptionConfig = mockContext . mock ( com . gemstone . gemfire . cache . server . ClientSubscriptionConfig . class , "ClientSubscriptionConfig" ) ; final com . gemstone . gemfire . cache . DiskStore mockDiskStore = mockContext . mock ( com . gemstone . gemfire . cache . DiskStore . class , "DiskStore" ) ; mockContext . checking ( new org . jmock . Expectations ( ) { { exactly ( 2 ) . of ( mockCacheServer ) . getClientSubscriptionConfig ( ) ; will ( returnValue ( mockClientSubscriptionConfig ) ) ; oneOf ( mockClientSubscriptionConfig ) . getDiskStoreName ( ) ; will ( returnValue ( "" ) ) ; oneOf ( mockDiskStore ) . getName ( ) ; will ( returnValue ( DiskStoreDetails . DEFAULT_DISK_STORE_NAME ) ) ; } } ) ; final com . gemstone . gemfire . management . internal . cli . functions . DescribeDiskStoreFunction function = createDescribeDiskStoreFunction ( null ) ; "<AssertPlaceHolder>" ; } isUsingDiskStore ( com . gemstone . gemfire . cache . Region , com . gemstone . gemfire . cache . DiskStore ) { return ( ( isPersistent ( region ) ) || ( isOverflowToDisk ( region ) ) ) && ( com . gemstone . gemfire . internal . lang . ObjectUtils . equals ( getDiskStoreName ( region ) , diskStore . getName ( ) ) ) ; }
org . junit . Assert . assertTrue ( function . isUsingDiskStore ( mockCacheServer , mockDiskStore ) )
removeTopicByIdAddedToGroupTest ( ) { org . kaaproject . kaa . common . dto . TopicDto topic = generateTopicDto ( null , null ) ; org . kaaproject . kaa . common . dto . EndpointGroupDto groupDto = generateEndpointGroupDto ( topic . getApplicationId ( ) ) ; endpointService . addTopicToEndpointGroup ( groupDto . getId ( ) , topic . getId ( ) ) ; topicService . removeTopicById ( topic . getId ( ) ) ; org . kaaproject . kaa . common . dto . TopicDto found = topicService . findTopicById ( topic . getId ( ) ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
org . junit . Assert . assertNull ( found )
testConvertEmpty ( ) { java . lang . Double result = underTest . convert ( "" ) ; "<AssertPlaceHolder>" ; } convert ( java . lang . String ) { if ( "S" . equalsIgnoreCase ( value ) ) { return Size . TINY ; } else if ( "M" . equalsIgnoreCase ( value ) ) { return Size . NORMAL ; } else if ( "L" . equalsIgnoreCase ( value ) ) { return Size . HUGE ; } else { return null ; } }
org . junit . Assert . assertNull ( result )
objectShouldNotBeEqualsWhenObjectIsOtherClass ( ) { org . eclipse . che . ide . ext . java . jdi . client . debug . DebuggerView testObject = mock ( org . eclipse . che . ide . ext . java . jdi . client . debug . DebuggerView . class ) ; boolean isEquals = debuggerVariable . equals ( testObject ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == o ) return true ; if ( ! ( o instanceof org . eclipse . che . ide . ext . java . client . project . node . jar . AbstractJarEntryNode ) ) return false ; if ( ! ( super . equals ( o ) ) ) return false ; org . eclipse . che . ide . ext . java . client . project . node . jar . AbstractJarEntryNode that = ( ( org . eclipse . che . ide . ext . java . client . project . node . jar . AbstractJarEntryNode ) ( o ) ) ; if ( ( libId ) != ( that . libId ) ) return false ; return true ; }
org . junit . Assert . assertThat ( isEquals , org . hamcrest . CoreMatchers . is ( false ) )
testReductionGlobal ( ) { org . datavec . local . transforms . transform . List < org . datavec . local . transforms . transform . List < org . datavec . api . writable . Writable > > in = org . datavec . local . transforms . transform . Arrays . asList ( org . datavec . local . transforms . transform . Arrays . < org . datavec . api . writable . Writable > asList ( new org . datavec . api . writable . Text ( "first" ) , new org . datavec . api . writable . DoubleWritable ( 3.0 ) ) , org . datavec . local . transforms . transform . Arrays . < org . datavec . api . writable . Writable > asList ( new org . datavec . api . writable . Text ( "second" ) , new org . datavec . api . writable . DoubleWritable ( 5.0 ) ) ) ; org . datavec . local . transforms . transform . List < org . datavec . local . transforms . transform . List < org . datavec . api . writable . Writable > > inData = in ; org . datavec . api . transform . schema . Schema s = new org . datavec . api . transform . schema . Schema . Builder ( ) . addColumnString ( "textCol" ) . addColumnDouble ( "doubleCol" ) . build ( ) ; org . datavec . api . transform . TransformProcess tp = new org . datavec . api . transform . TransformProcess . Builder ( s ) . reduce ( new org . datavec . api . transform . reduce . Reducer . Builder ( org . datavec . api . transform . ReduceOp . TakeFirst ) . takeFirstColumns ( "textCol" ) . meanColumns ( "doubleCol" ) . build ( ) ) . build ( ) ; org . datavec . local . transforms . transform . List < org . datavec . local . transforms . transform . List < org . datavec . api . writable . Writable > > outRdd = org . datavec . local . transforms . LocalTransformExecutor . execute ( inData , tp ) ; org . datavec . local . transforms . transform . List < org . datavec . local . transforms . transform . List < org . datavec . api . writable . Writable > > out = outRdd ; org . datavec . local . transforms . transform . List < org . datavec . local . transforms . transform . List < org . datavec . api . writable . Writable > > expOut = org . datavec . local . transforms . transform . Collections . singletonList ( org . datavec . local . transforms . transform . Arrays . < org . datavec . api . writable . Writable > asList ( new org . datavec . api . writable . Text ( "first" ) , new org . datavec . api . writable . DoubleWritable ( 4.0 ) ) ) ; "<AssertPlaceHolder>" ; } execute ( org . datavec . local . transforms . List , org . datavec . api . transform . TransformProcess ) { if ( ( transformProcess . getFinalSchema ( ) ) instanceof org . datavec . api . transform . schema . SequenceSchema ) { throw new java . lang . IllegalStateException ( "Cannot<sp>return<sp>sequence<sp>data<sp>with<sp>this<sp>method" ) ; } org . datavec . local . transforms . List < org . datavec . local . transforms . List < org . datavec . local . transforms . Writable > > filteredSequence = inputWritables . parallelStream ( ) . filter ( ( input ) -> ( input . size ( ) ) == ( transformProcess . getInitialSchema ( ) . numColumns ( ) ) ) . collect ( toList ( ) ) ; if ( ( filteredSequence . size ( ) ) != ( inputWritables . size ( ) ) ) { log . warn ( ( ( "Filtered<sp>out<sp>" + ( ( inputWritables . size ( ) ) - ( filteredSequence . size ( ) ) ) ) + "<sp>values" ) ) ; } return org . datavec . local . transforms . LocalTransformExecutor . execute ( filteredSequence , null , transformProcess ) . getFirst ( ) ; }
org . junit . Assert . assertEquals ( expOut , out )
testSerialization ( ) { org . apache . commons . math4 . geometry . Space s1 = org . apache . commons . math4 . geometry . spherical . oned . Sphere1D . getInstance ( ) ; org . apache . commons . math4 . geometry . Space deserialized = ( ( org . apache . commons . math4 . geometry . Space ) ( org . apache . commons . math4 . TestUtils . serializeAndRecover ( s1 ) ) ) ; "<AssertPlaceHolder>" ; } serializeAndRecover ( java . lang . Object ) { try { java . io . ByteArrayOutputStream bos = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutputStream so = new java . io . ObjectOutputStream ( bos ) ; so . writeObject ( o ) ; java . io . ByteArrayInputStream bis = new java . io . ByteArrayInputStream ( bos . toByteArray ( ) ) ; java . io . ObjectInputStream si = new java . io . ObjectInputStream ( bis ) ; return si . readObject ( ) ; } catch ( java . lang . Exception e ) { throw new java . lang . RuntimeException ( e ) ; } }
org . junit . Assert . assertTrue ( ( s1 == deserialized ) )
testGetAllGlobal ( ) { config . putGlobal ( "section1.int" , 1 ) ; config . putGlobal ( "section1.subsection.string" , "2" ) ; config . putGlobal ( "section1.subsection.subsub.int" , 1 ) ; config . putGlobal ( "section2.int" , 3 ) ; config . putGlobal ( "section2.subsection.string" , "4" ) ; java . util . Map < java . lang . String , java . lang . String > all = config . getAllGlobal ( ) ; java . util . Map < java . lang . String , java . lang . String > expected = com . google . common . collect . ImmutableMap . of ( "section1.int" , "1" , "section1.subsection.string" , "2" , "section1.subsection.subsub.int" , "1" , "section2.int" , "3" , "section2.subsection.string" , "4" ) ; "<AssertPlaceHolder>" ; } getAllGlobal ( ) { return all ( global ( ) ) ; }
org . junit . Assert . assertEquals ( expected , all )
testCreateNull ( ) { com . j256 . ormlite . dao . Dao < com . j256 . ormlite . dao . Foo , java . lang . Integer > dao = createDao ( com . j256 . ormlite . dao . Foo . class , true ) ; "<AssertPlaceHolder>" ; } create ( T ) { checkForInitialized ( ) ; if ( data == null ) { return 0 ; } if ( data instanceof com . j256 . ormlite . misc . BaseDaoEnabled ) { @ com . j256 . ormlite . dao . SuppressWarnings ( "unchecked" ) com . j256 . ormlite . misc . BaseDaoEnabled < T , ID > daoEnabled = ( ( com . j256 . ormlite . misc . BaseDaoEnabled < T , ID > ) ( data ) ) ; daoEnabled . setDao ( this ) ; } com . j256 . ormlite . support . DatabaseConnection connection = connectionSource . getReadWriteConnection ( tableInfo . getTableName ( ) ) ; try { return statementExecutor . create ( connection , data , objectCache ) ; } finally { connectionSource . releaseConnection ( connection ) ; } }
org . junit . Assert . assertEquals ( 0 , dao . create ( ( ( com . j256 . ormlite . dao . Foo ) ( null ) ) ) )
determinesFacingRight ( ) { com . fundynamic . d2tm . math . Vector2D coordinatesToFaceTo = unitAbsoluteMapCoordinates . add ( create ( 1 , 0 ) ) ; "<AssertPlaceHolder>" ; } determine ( com . fundynamic . d2tm . math . Vector2D , com . fundynamic . d2tm . math . Vector2D ) { boolean left = ( to . getXAsInt ( ) ) < ( from . getXAsInt ( ) ) ; boolean right = ( to . getXAsInt ( ) ) > ( from . getXAsInt ( ) ) ; boolean up = ( to . getYAsInt ( ) ) < ( from . getYAsInt ( ) ) ; boolean down = ( to . getYAsInt ( ) ) > ( from . getYAsInt ( ) ) ; if ( up && left ) return com . fundynamic . d2tm . game . entities . units . UnitFacings . LEFT_UP ; if ( up && right ) return com . fundynamic . d2tm . game . entities . units . UnitFacings . RIGHT_UP ; if ( down && left ) return com . fundynamic . d2tm . game . entities . units . UnitFacings . LEFT_DOWN ; if ( down && right ) return com . fundynamic . d2tm . game . entities . units . UnitFacings . RIGHT_DOWN ; if ( up ) return com . fundynamic . d2tm . game . entities . units . UnitFacings . UP ; if ( down ) return com . fundynamic . d2tm . game . entities . units . UnitFacings . DOWN ; if ( left ) return com . fundynamic . d2tm . game . entities . units . UnitFacings . LEFT ; if ( right ) return com . fundynamic . d2tm . game . entities . units . UnitFacings . RIGHT ; return com . fundynamic . d2tm . game . entities . units . UnitFacings . RIGHT ; }
org . junit . Assert . assertEquals ( com . fundynamic . d2tm . game . entities . units . RIGHT , determine ( unitAbsoluteMapCoordinates , coordinatesToFaceTo ) )
testTransient ( ) { java . lang . reflect . Field field = getClass ( ) . getDeclaredField ( "trnsient" ) ; org . seasar . extension . jdbc . PropertyMeta propertyMeta = propertyMetaFactory . createPropertyMeta ( field , new org . seasar . extension . jdbc . EntityMeta ( ) ) ; org . seasar . extension . jdbc . gen . desc . ColumnDesc columnDesc = columnDescFactory . getColumnDesc ( new org . seasar . extension . jdbc . EntityMeta ( ) , propertyMeta ) ; "<AssertPlaceHolder>" ; } getColumnDesc ( org . seasar . extension . jdbc . EntityMeta , org . seasar . extension . jdbc . PropertyMeta ) { if ( ( propertyMeta . isTransient ( ) ) || ( propertyMeta . isRelationship ( ) ) ) { return null ; } javax . persistence . Column column = getColumn ( propertyMeta ) ; org . seasar . extension . jdbc . gen . desc . ColumnDesc columnDesc = new org . seasar . extension . jdbc . gen . desc . ColumnDesc ( ) ; doName ( entityMeta , propertyMeta , columnDesc , column ) ; doComment ( entityMeta , propertyMeta , columnDesc , column ) ; doIdentity ( entityMeta , propertyMeta , columnDesc , column ) ; doDefinition ( entityMeta , propertyMeta , columnDesc , column ) ; doNullable ( entityMeta , propertyMeta , columnDesc , column ) ; doUnique ( entityMeta , propertyMeta , columnDesc , column ) ; doSqlType ( entityMeta , propertyMeta , columnDesc , column ) ; return columnDesc ; }
org . junit . Assert . assertNull ( columnDesc )
addFailureDelegatesToNotifier ( ) { org . junit . runner . Result result = new org . junit . runner . Result ( ) ; org . junit . runner . notification . RunListener listener = result . createListener ( ) ; org . junit . runner . notification . RunNotifier notifier = new org . junit . runner . notification . RunNotifier ( ) ; notifier . addFirstListener ( listener ) ; junit . framework . TestCase testCase = new junit . framework . TestCase ( ) { } ; junit . framework . TestListener adaptingListener = new org . junit . internal . runners . JUnit38ClassRunner ( testCase ) . createAdaptingListener ( notifier ) ; adaptingListener . addFailure ( testCase , new junit . framework . AssertionFailedError ( ) ) ; "<AssertPlaceHolder>" ; } getFailureCount ( ) { return failures . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , result . getFailureCount ( ) )
testDockerLoginNoConfig ( ) { executeWithTempHomeDir ( new io . fabric8 . maven . docker . util . AuthConfigFactoryTest . HomeDirExecutor ( ) { @ io . fabric8 . maven . docker . util . Override public void exec ( java . io . File dir ) throws java . io . IOException , org . apache . maven . plugin . MojoExecutionException { io . fabric8 . maven . docker . access . AuthConfig config = factory . createAuthConfig ( isPush , false , null , settings , "roland" , null ) ; "<AssertPlaceHolder>" ; } } ) ; } createAuthConfig ( boolean , boolean , java . util . Map , org . apache . maven . settings . Settings , java . lang . String , java . lang . String ) { io . fabric8 . maven . docker . access . AuthConfig ret = createStandardAuthConfig ( isPush , authConfig , settings , user , registry ) ; if ( ret != null ) { if ( ( registry == null ) || skipExtendedAuth ) { return ret ; } try { return extendedAuthentication ( ret , registry ) ; } catch ( java . io . IOException e ) { throw new org . apache . maven . plugin . MojoExecutionException ( e . getMessage ( ) , e ) ; } } ret = getAuthConfigFromDockerConfig ( registry ) ; if ( ret != null ) { log . debug ( "AuthConfig:<sp>credentials<sp>from<sp>~/.docker/config.json" ) ; return ret ; } log . debug ( "AuthConfig:<sp>no<sp>credentials<sp>found" ) ; return null ; }
org . junit . Assert . assertNull ( config )
testHandleAliveResponseNoNeedDiscovery ( ) { org . openkilda . wfm . topology . floodlightrouter . service . FloodlightTracker floodlightTracker = new org . openkilda . wfm . topology . floodlightrouter . service . FloodlightTracker ( floodlights , org . openkilda . wfm . topology . floodlightrouter . service . FloodlightTrackerTest . DEFAULT_ALIVE_TIMEOUT , org . openkilda . wfm . topology . floodlightrouter . service . FloodlightTrackerTest . DEFAULT_RESPONSE_TIMEOUT ) ; floodlightTracker . floodlightStatus . get ( org . openkilda . wfm . topology . floodlightrouter . service . FloodlightTrackerTest . REGION_ONE ) . setAlive ( true ) ; long responseTime = ( java . lang . System . currentTimeMillis ( ) ) - ( TimeUnit . SECONDS . toMillis ( 2 ) ) ; "<AssertPlaceHolder>" ; } handleAliveResponse ( java . lang . String , long ) { log . debug ( "Handling<sp>alive<sp>response<sp>for<sp>region<sp>{}" , region ) ; org . openkilda . wfm . topology . floodlightrouter . service . FloodlightInstance instance = floodlightStatus . get ( region ) ; if ( timestamp < ( instance . getLastAliveResponse ( ) ) ) { return false ; } instance . setLastAliveResponse ( timestamp ) ; boolean needDiscovery = false ; if ( ( timestamp + ( aliveTimeout ) ) > ( java . lang . System . currentTimeMillis ( ) ) ) { if ( ! ( instance . isAlive ( ) ) ) { log . info ( "Region<sp>{}<sp>is<sp>went<sp>online" , region ) ; needDiscovery = true ; } instance . setAlive ( true ) ; } else { log . debug ( "Outdated<sp>alive<sp>response<sp>for<sp>region<sp>{}" , region ) ; } return needDiscovery ; }
org . junit . Assert . assertFalse ( floodlightTracker . handleAliveResponse ( org . openkilda . wfm . topology . floodlightrouter . service . FloodlightTrackerTest . REGION_ONE , responseTime ) )
testInstanceDefinitionForUnknownValue ( ) { "<AssertPlaceHolder>" ; } instanceDefinitionFor ( com . cronutils . model . CronType ) { switch ( cronType ) { case CRON4J : return com . cronutils . model . definition . CronDefinitionBuilder . cron4j ( ) ; case QUARTZ : return com . cronutils . model . definition . CronDefinitionBuilder . quartz ( ) ; case UNIX : return com . cronutils . model . definition . CronDefinitionBuilder . unixCrontab ( ) ; case SPRING : return com . cronutils . model . definition . CronDefinitionBuilder . spring ( ) ; default : throw new java . lang . IllegalArgumentException ( java . lang . String . format ( "No<sp>cron<sp>definition<sp>found<sp>for<sp>%s" , cronType ) ) ; } }
org . junit . Assert . assertNotNull ( com . cronutils . model . definition . CronDefinitionBuilder . instanceDefinitionFor ( null ) )
testToArray ( ) { final int cap = 100 ; final java . util . concurrent . BlockingQueue < java . lang . Integer > dbq = new com . conversantmedia . util . concurrent . PushPullBlockingQueue < java . lang . Integer > ( cap ) ; for ( int i = 0 ; i < cap ; i ++ ) { dbq . offer ( java . lang . Integer . valueOf ( i ) ) ; } java . lang . Object [ ] objArray = dbq . toArray ( ) ; for ( int i = 0 ; i < cap ; i ++ ) { "<AssertPlaceHolder>" ; } } toArray ( ) { final E [ ] e = ( ( E [ ] ) ( new java . lang . Object [ com . conversantmedia . util . concurrent . MPMCBlockingQueue . size ( ) ] ) ) ; toArray ( e ) ; return e ; }
org . junit . Assert . assertEquals ( objArray [ i ] , java . lang . Integer . valueOf ( i ) )
testTreeSet ( ) { org . simpleflatmapper . util . TypeReference < java . util . TreeSet < java . lang . String > > typeReference = new org . simpleflatmapper . util . TypeReference < java . util . TreeSet < java . lang . String > > ( ) { } ; "<AssertPlaceHolder>" ; } testSet ( org . simpleflatmapper . util . TypeReference ) { org . simpleflatmapper . reflect . test . meta . ClassMeta < ? > classMeta = org . simpleflatmapper . reflect . ReflectionService . newInstance ( ) . getClassMeta ( typeReference . getType ( ) ) ; org . junit . Assert . assertTrue ( ( classMeta instanceof org . simpleflatmapper . reflect . test . meta . ArrayClassMeta ) ) ; org . simpleflatmapper . reflect . test . meta . PropertyMeta p = findProperty ( classMeta ) ; java . util . Set < java . lang . String > list = ( ( java . util . Set < java . lang . String > ) ( instantiate ( classMeta ) ) ) ; p . getSetter ( ) . set ( list , "aaa" ) ; org . junit . Assert . assertEquals ( null , p . getGetter ( ) . get ( list ) ) ; org . junit . Assert . assertEquals ( "aaa" , list . iterator ( ) . next ( ) ) ; return list ; }
org . junit . Assert . assertTrue ( ( ( testSet ( typeReference ) ) instanceof java . util . TreeSet ) )
testCacheGroupingSuggestionsAllRejected ( ) { org . mockito . Mockito . doNothing ( ) . when ( groupingSuggestionsCacheManager ) . putGroupingSuggestions ( org . mockito . Mockito . eq ( "orcid" ) , suggestionListCaptor . capture ( ) ) ; org . mockito . Mockito . when ( groupingSuggestionDao . findGroupingSuggestionIdAndOrcid ( org . mockito . Mockito . eq ( "orcid" ) , org . mockito . Mockito . eq ( "1,2" ) ) ) . thenReturn ( getRejectedGroupingSuggestion ( "orcid" , "1,2" ) ) ; org . mockito . Mockito . when ( groupingSuggestionDao . findGroupingSuggestionIdAndOrcid ( org . mockito . Mockito . eq ( "orcid" ) , org . mockito . Mockito . eq ( "3,4" ) ) ) . thenReturn ( getRejectedGroupingSuggestion ( "orcid" , "3,4" ) ) ; org . mockito . Mockito . when ( groupingSuggestionDao . findGroupingSuggestionIdAndOrcid ( org . mockito . Mockito . eq ( "orcid" ) , org . mockito . Mockito . eq ( "5,6" ) ) ) . thenReturn ( getRejectedGroupingSuggestion ( "orcid" , "5,6" ) ) ; org . orcid . pojo . grouping . WorkGroupingSuggestion first = getWorkGroupingSuggestion ( new java . lang . Long [ ] { 1L , 2L } ) ; org . orcid . pojo . grouping . WorkGroupingSuggestion second = getWorkGroupingSuggestion ( new java . lang . Long [ ] { 3L , 4L } ) ; org . orcid . pojo . grouping . WorkGroupingSuggestion third = getWorkGroupingSuggestion ( new java . lang . Long [ ] { 5L , 6L } ) ; groupingSuggestionManager . cacheGroupingSuggestions ( "orcid" , java . util . Arrays . asList ( first , second , third ) ) ; java . util . List < org . orcid . pojo . grouping . WorkGroupingSuggestion > retrieved = suggestionListCaptor . getValue ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( org . apache . commons . lang . StringUtils . trimToEmpty ( queryString . toString ( ) ) . length ( ) ) == 0 ; }
org . junit . Assert . assertTrue ( retrieved . isEmpty ( ) )
testWriteOneByte ( ) { bsos . write ( 1 ) ; org . jerlang . type . BitString expected = new org . jerlang . type . BitString ( new byte [ ] { 1 } ) ; "<AssertPlaceHolder>" ; } toBitString ( ) { if ( ( bitOffset ) == 0 ) { return new org . jerlang . type . Binary ( bytes . toByteArray ( ) ) ; } else { bytes . write ( currentByte ) ; return new org . jerlang . type . BitString ( bytes . toByteArray ( ) , ( 8 - ( bitOffset ) ) ) ; } }
org . junit . Assert . assertEquals ( expected , bsos . toBitString ( ) )
testSimpleCondition ( ) { io . cdap . cdap . etl . common . PipelinePhase phase4 = io . cdap . cdap . etl . common . PipelinePhase . builder ( pluginTypes ) . addStage ( io . cdap . cdap . etl . proto . v2 . spec . StageSpec . builder ( "condition.connector" , io . cdap . cdap . etl . planner . PipelinePlannerTest . connectorSpec ( "condition.connector" , Constants . Connector . SOURCE_TYPE ) ) . build ( ) ) . addStage ( io . cdap . cdap . etl . proto . v2 . spec . StageSpec . builder ( "n4" , io . cdap . cdap . etl . planner . PipelinePlannerTest . NODE ) . build ( ) ) . addConnection ( "condition.connector" , "n4" ) . build ( ) ; controlPhaseDag = new io . cdap . cdap . etl . planner . Dag ( com . google . common . collect . ImmutableSet . of ( new io . cdap . cdap . etl . proto . Connection ( "condition" , "n4" ) ) ) ; java . lang . String phase4Name = io . cdap . cdap . etl . planner . PipelinePlanner . getPhaseName ( controlPhaseDag ) ; phases . put ( phase4Name , phase4 ) ; java . util . Set < io . cdap . cdap . etl . proto . Connection > phaseConnections = new java . util . HashSet ( ) ; phaseConnections . add ( new io . cdap . cdap . etl . proto . Connection ( phase1Name , phase2Name ) ) ; phaseConnections . add ( new io . cdap . cdap . etl . proto . Connection ( phase2Name , phase3Name , true ) ) ; phaseConnections . add ( new io . cdap . cdap . etl . proto . Connection ( phase2Name , phase4Name , false ) ) ; io . cdap . cdap . etl . planner . PipelinePlan expected = new io . cdap . cdap . etl . planner . PipelinePlan ( phases , phaseConnections ) ; io . cdap . cdap . etl . planner . PipelinePlan actual = planner . plan ( pipelineSpec ) ; "<AssertPlaceHolder>" ; } plan ( io . cdap . cdap . etl . proto . v2 . spec . PipelineSpec ) { java . util . Set < java . lang . String > reduceNodes = new java . util . HashSet ( ) ; java . util . Set < java . lang . String > isolationNodes = new java . util . HashSet ( ) ; java . util . Set < java . lang . String > actionNodes = new java . util . HashSet ( ) ; java . util . Set < java . lang . String > multiPortNodes = new java . util . HashSet ( ) ; java . util . Set < java . lang . String > allNodes = new java . util . HashSet ( ) ; java . util . Map < java . lang . String , io . cdap . cdap . etl . planner . ConditionBranches > conditionBranches = new java . util . HashMap ( ) ; java . util . Map < java . lang . String , java . util . Set < java . lang . String > > conditionOutputs = new java . util . HashMap ( ) ; java . util . Map < java . lang . String , java . util . Set < java . lang . String > > conditionInputs = new java . util . HashMap ( ) ; java . util . Map < java . lang . String , io . cdap . cdap . etl . proto . v2 . spec . StageSpec > specs = new java . util . HashMap ( ) ; for ( io . cdap . cdap . etl . proto . v2 . spec . StageSpec stage : spec . getStages ( ) ) { java . lang . String pluginType = stage . getPlugin ( ) . getType ( ) ; allNodes . add ( stage . getName ( ) ) ; if ( reduceTypes . contains ( pluginType ) ) { reduceNodes . add ( stage . getName ( ) ) ; } if ( isolationTypes . contains ( pluginType ) ) { isolationNodes . add ( stage . getName ( ) ) ; } if ( actionTypes . contains ( pluginType ) ) { actionNodes . add ( stage . getName ( ) ) ; } if ( multiPortTypes . contains ( pluginType ) ) { multiPortNodes . add ( stage . getName ( ) ) ; } if ( Condition . PLUGIN_TYPE . equals ( pluginType ) ) { conditionBranches . put ( stage . getName ( ) , new io . cdap . cdap . etl . planner . ConditionBranches ( null , null ) ) ; conditionOutputs . put ( stage . getName ( ) , new java . util . HashSet < java . lang . String > ( ) ) ; conditionInputs . put ( stage . getName ( ) , new java . util . HashSet < java . lang . String > ( ) ) ; } specs . put ( stage . getName ( ) , stage ) ; } if ( spec . getConnections ( ) . isEmpty ( ) ) { if ( ! ( actionNodes . containsAll ( allNodes ) ) ) { throw new java . lang . IllegalStateException ( "No<sp>connections<sp>are<sp>specified." ) ; } java . util . Map < java . lang . String , io . cdap . cdap . etl . common . PipelinePhase > phases = new java . util . HashMap ( ) ; for ( java . lang . String actionNode : actionNodes ) { io . cdap . cdap . etl . common
org . junit . Assert . assertEquals ( expected , actual )
testEquality ( ) { javax . measure . Quantity < javax . measure . quantity . Length > value = tec . units . ri . quantity . Quantities . getQuantity ( new java . lang . Double ( 10 ) , Units . METRE ) ; javax . measure . Quantity < javax . measure . quantity . Length > anotherValue = tec . units . ri . quantity . Quantities . getQuantity ( new java . lang . Long ( 10 ) , Units . METRE ) ; "<AssertPlaceHolder>" ; } getQuantity ( java . lang . Number , javax . measure . Unit ) { if ( value == null ) throw new java . lang . NullPointerException ( ) ; if ( unit == null ) throw new java . lang . NullPointerException ( ) ; if ( tec . units . ri . quantity . Double . class . isInstance ( value ) ) { return new tec . units . ri . quantity . DoubleQuantity < Q > ( value . doubleValue ( ) , unit ) ; } else if ( tec . units . ri . quantity . Long . class . isInstance ( value ) ) { return new tec . units . ri . quantity . LongQuantity < Q > ( tec . units . ri . quantity . Long . class . cast ( value ) , unit ) ; } else if ( tec . units . ri . quantity . Short . class . isInstance ( value ) ) { return new tec . units . ri . quantity . ShortQuantity < Q > ( tec . units . ri . quantity . Short . class . cast ( value ) , unit ) ; } else if ( tec . units . ri . quantity . Integer . class . isInstance ( value ) ) { return new tec . units . ri . quantity . IntegerQuantity < Q > ( tec . units . ri . quantity . Integer . class . cast ( value ) , unit ) ; } else if ( tec . units . ri . quantity . Float . class . isInstance ( value ) ) { return new tec . units . ri . quantity . FloatQuantity < Q > ( tec . units . ri . quantity . Float . class . cast ( value ) , unit ) ; } return new tec . units . ri . quantity . NumberQuantity < Q > ( value , unit ) ; }
org . junit . Assert . assertEquals ( value , anotherValue )
testStaticNat ( ) { long vlanId = 123 ; java . util . List < com . cloud . agent . api . to . StaticNatRuleTO > rules = new java . util . ArrayList < com . cloud . agent . api . to . StaticNatRuleTO > ( ) ; com . cloud . agent . api . to . StaticNatRuleTO active = new com . cloud . agent . api . to . StaticNatRuleTO ( 0 , "1.2.3.4" , null , null , "5.6.7.8" , null , null , null , false , false ) ; rules . add ( active ) ; com . cloud . agent . api . to . StaticNatRuleTO revoked = new com . cloud . agent . api . to . StaticNatRuleTO ( 0 , "1.2.3.4" , null , null , "5.6.7.8" , null , null , null , true , false ) ; rules . add ( revoked ) ; com . cloud . agent . api . routing . SetStaticNatRulesCommand cmd = new com . cloud . agent . api . routing . SetStaticNatRulesCommand ( rules , null ) ; cmd . setContextParam ( NetworkElementCommand . GUEST_VLAN_TAG , java . lang . Long . toString ( vlanId ) ) ; cmd . setContextParam ( NetworkElementCommand . GUEST_NETWORK_CIDR , "1.2.3.4/32" ) ; _resource . setConnection ( _connection ) ; when ( _connection . createTenantVDCNatPolicySet ( anyString ( ) ) ) . thenReturn ( true ) ; when ( _connection . createTenantVDCAclPolicySet ( anyString ( ) , anyBoolean ( ) ) ) . thenReturn ( true ) ; when ( _connection . createTenantVDCDNatPolicy ( anyString ( ) , anyString ( ) ) ) . thenReturn ( true ) ; when ( _connection . createTenantVDCDNatPolicyRef ( anyString ( ) , anyString ( ) ) ) . thenReturn ( true ) ; when ( _connection . createTenantVDCAclPolicy ( anyString ( ) , anyString ( ) ) ) . thenReturn ( true ) ; when ( _connection . createTenantVDCAclPolicyRef ( anyString ( ) , anyString ( ) , anyBoolean ( ) ) ) . thenReturn ( true ) ; when ( _connection . deleteTenantVDCDNatRule ( anyString ( ) , anyLong ( ) , anyString ( ) ) ) . thenReturn ( true ) ; when ( _connection . deleteTenantVDCAclRule ( anyString ( ) , anyLong ( ) , anyString ( ) ) ) . thenReturn ( true ) ; when ( _connection . createTenantVDCDNatIpPool ( anyString ( ) , anyString ( ) , anyString ( ) ) ) . thenReturn ( true ) ; when ( _connection . createTenantVDCDNatRule ( anyString ( ) , anyLong ( ) , anyString ( ) , anyString ( ) ) ) . thenReturn ( true ) ; when ( _connection . createTenantVDCAclRuleForDNat ( anyString ( ) , anyLong ( ) , anyString ( ) , anyString ( ) ) ) . thenReturn ( true ) ; when ( _connection . associateAclPolicySet ( anyString ( ) ) ) . thenReturn ( true ) ; com . cloud . agent . api . Answer answer = _resource . executeRequest ( cmd ) ; System . out . println ( answer . getDetails ( ) ) ; "<AssertPlaceHolder>" ; } getResult ( ) { return this . result ; }
org . junit . Assert . assertTrue ( answer . getResult ( ) )
testGetConnectionFromRepository ( ) { org . talend . core . model . metadata . builder . connection . DatabaseConnection conn = ( ( org . talend . core . model . metadata . builder . connection . DatabaseConnection ) ( org . talend . core . model . metadata . MetadataToolHelper . getConnectionFromRepository ( org . talend . core . model . metadata . MetadataToolHelperTest . databaseConnItem . getProperty ( ) . getId ( ) ) ) ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
org . junit . Assert . assertEquals ( conn . getId ( ) , org . talend . core . model . metadata . MetadataToolHelperTest . connection . getId ( ) )
testGetEntriesCountInSameCompany ( ) { addEntry ( 0 , 0 ) ; int entriesCount = com . liferay . announcements . kernel . service . AnnouncementsEntryLocalServiceUtil . getEntriesCount ( _user . getCompanyId ( ) , 0 , 0 , false ) ; "<AssertPlaceHolder>" ; } getCompanyId ( ) { return _companyId ; }
org . junit . Assert . assertEquals ( 1 , entriesCount )
test_isValidForSqlQuery_String_null_andNullable ( ) { ch . puzzle . itc . mobiliar . business . deploy . entity . CustomFilter c = ch . puzzle . itc . mobiliar . business . deploy . entity . CustomFilter . builder ( stringType ) . filterDisplayName ( "filter<sp>DisplayName" ) . deploymentTableColumnName ( "deploymentTableColumnName" ) . build ( ) ; c . setComparatorSelection ( ComparatorFilterOption . eq ) ; c . setNullableFilter ( true ) ; c . setValue ( null ) ; "<AssertPlaceHolder>" ; } isValidForSqlQuery ( ) { return ( ( ! ( filterType . equals ( FilterType . SpecialFilterType ) ) ) && ( ( hasValidNullValue ( ) ) || ( ( ( value ) != null ) && ( ! ( value . toString ( ) . trim ( ) . isEmpty ( ) ) ) ) ) ) && ( ( comparatorSelection ) != null ) ; }
org . junit . Assert . assertTrue ( c . isValidForSqlQuery ( ) )
isNotebookPublicTest ( ) { org . apache . zeppelin . conf . ZeppelinConfiguration conf = new org . apache . zeppelin . conf . ZeppelinConfiguration ( this . getClass ( ) . getResource ( "/zeppelin-site.xml" ) ) ; boolean isIt = conf . isNotebookPublic ( ) ; "<AssertPlaceHolder>" ; } isNotebookPublic ( ) { return getBoolean ( org . apache . zeppelin . conf . ZeppelinConfiguration . ConfVars . ZEPPELIN_NOTEBOOK_PUBLIC ) ; }
org . junit . Assert . assertTrue ( isIt )
testStripLeadingAndTailingQuotesNull ( ) { java . lang . String result = org . sagebionetworks . table . query . model . DerivedColumn . stripLeadingAndTailingQuotes ( null ) ; "<AssertPlaceHolder>" ; } stripLeadingAndTailingQuotes ( java . lang . String ) { if ( input == null ) { return null ; } java . lang . StringBuilder builder = new java . lang . StringBuilder ( ) ; char [ ] chars = input . toCharArray ( ) ; for ( int i = 0 ; i < ( chars . length ) ; i ++ ) { char thisChar = chars [ i ] ; if ( ( i == 0 ) || ( i == ( ( chars . length ) - 1 ) ) ) { switch ( thisChar ) { case '"' : case '`' : case '\'' : continue ; } } builder . append ( chars [ i ] ) ; } return builder . toString ( ) ; }
org . junit . Assert . assertEquals ( null , result )
testGetSecurityFunction ( ) { when ( securityFunctionDaoHelper . getSecurityFunctionEntity ( org . finra . herd . service . impl . SECURITY_FUNCTION ) ) . thenReturn ( org . finra . herd . service . impl . SecurityFunctionServiceImplTest . SECURITY_FUNCTION_ENTITY ) ; when ( alternateKeyHelper . validateStringParameter ( anyString ( ) , anyString ( ) ) ) . thenReturn ( org . finra . herd . service . impl . SECURITY_FUNCTION ) ; org . finra . herd . model . api . xml . SecurityFunction securityFunction = securityFunctionService . getSecurityFunction ( org . finra . herd . service . impl . SecurityFunctionServiceImplTest . SECURITY_FUNCTION_KEY ) ; "<AssertPlaceHolder>" ; verify ( alternateKeyHelper ) . validateStringParameter ( "security<sp>function<sp>name" , org . finra . herd . service . impl . SecurityFunctionServiceImplTest . SECURITY_FUNCTION_KEY . getSecurityFunctionName ( ) ) ; verify ( securityFunctionDaoHelper ) . getSecurityFunctionEntity ( org . finra . herd . service . impl . SECURITY_FUNCTION ) ; verifyNoMoreInteractionsHelper ( ) ; } getSecurityFunction ( java . lang . String ) { return securityFunctionService . getSecurityFunction ( new org . finra . herd . model . api . xml . SecurityFunctionKey ( securityFunctionName ) ) ; }
org . junit . Assert . assertEquals ( org . finra . herd . service . impl . SECURITY_FUNCTION , securityFunction . getSecurityFunctionName ( ) )
testGetName1 ( ) { org . dresdenocl . pivotmodel . PrimitiveType type ; java . lang . String msg ; msg = "The<sp>adaptation<sp>of<sp>PrimitiveType.getName()<sp>seems<sp>to<sp>be<sp>wrong." ; for ( java . lang . String aTypesName : org . dresdenocl . metamodels . test . tests . TestPrimitiveType . allPrimitiveTypes . keySet ( ) ) { type = ( ( org . dresdenocl . pivotmodel . PrimitiveType ) ( org . dresdenocl . metamodels . test . tests . TestPrimitiveType . allPrimitiveTypes . get ( aTypesName ) ) ) ; "<AssertPlaceHolder>" ; } } getName ( ) { return this . dslDataType . getName ( ) ; }
org . junit . Assert . assertNotNull ( msg , type . getName ( ) )
testConvertToDatumBytes ( ) { byte [ ] expected = new byte [ ] { 0 , 1 , 2 , 3 } ; org . talend . daikon . avro . converter . AvroConverter < java . lang . Object , java . lang . Object > converter = org . talend . codegen . converter . IdentityConverter . getInstance ( ) ; byte [ ] actual = ( ( byte [ ] ) ( converter . convertToDatum ( expected ) ) ) ; "<AssertPlaceHolder>" ; } convertToDatum ( java . lang . String ) { return new java . math . BigDecimal ( value ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testEncryptionWithIvWithTagLengthWithAdditionAuthenticatedData ( ) { de . rub . nds . tlsattacker . core . crypto . cipher . NullCipher cipher = new de . rub . nds . tlsattacker . core . crypto . cipher . NullCipher ( ) ; byte [ ] bEncrypted = cipher . encrypt ( bIV , iTag , bAuth , bMessage ) ; "<AssertPlaceHolder>" ; } encrypt ( byte [ ] , int , byte [ ] , byte [ ] ) { int concatIvLength = iv . length ; byte [ ] nonce = org . bouncycastle . util . Arrays . copyOfRange ( iv , ( concatIvLength - ( de . rub . nds . tlsattacker . core . record . cipher . RecordAEADCipher . SEQUENCE_NUMBER_LENGTH ) ) , concatIvLength ) ; byte [ ] writeIv = org . bouncycastle . util . Arrays . copyOfRange ( iv , 0 , ( concatIvLength - ( de . rub . nds . tlsattacker . core . record . cipher . RecordAEADCipher . SEQUENCE_NUMBER_LENGTH ) ) ) ; this . cipher . init ( true , new org . bouncycastle . crypto . params . ParametersWithIV ( new org . bouncycastle . crypto . params . KeyParameter ( this . key , 0 , this . key . length ) , this . ZEROES , 0 , de . rub . nds . tlsattacker . core . record . cipher . RecordAEADCipher . AEAD_IV_LENGTH ) ) ; int additionalDataLength = additionAuthenticatedData . length ; int plaintextLength = someBytes . length ; byte [ ] ciphertext = new byte [ getOutputSize ( true , plaintextLength ) ] ; byte [ ] rfc7905Iv = calculateRFC7905Iv ( nonce , writeIv ) ; this . cipher . init ( true , new org . bouncycastle . crypto . params . ParametersWithIV ( null , rfc7905Iv ) ) ; initMAC ( ) ; updateMAC ( additionAuthenticatedData , 0 , additionalDataLength ) ; cipher . processBytes ( someBytes , 0 , plaintextLength , ciphertext , 0 ) ; updateMAC ( ciphertext , 0 , plaintextLength ) ; byte [ ] aadLengthLittleEndian = de . rub . nds . modifiablevariable . util . ArrayConverter . reverseByteOrder ( de . rub . nds . modifiablevariable . util . ArrayConverter . longToBytes ( java . lang . Long . valueOf ( additionalDataLength ) , 8 ) ) ; byte [ ] plaintextLengthLittleEndian = de . rub . nds . modifiablevariable . util . ArrayConverter . reverseByteOrder ( de . rub . nds . modifiablevariable . util . ArrayConverter . longToBytes ( java . lang . Long . valueOf ( plaintextLength ) , 8 ) ) ; byte [ ] aadPlaintextLengthsLittleEndian = de . rub . nds . modifiablevariable . util . ArrayConverter . concatenate ( aadLengthLittleEndian , plaintextLengthLittleEndian , 8 ) ; mac . update ( aadPlaintextLengthsLittleEndian , 0 , RecordAEADCipher . AEAD_TAG_LENGTH ) ; mac . doFinal ( ciphertext , ( 0 + plaintextLength ) ) ; return ciphertext ; }
org . junit . Assert . assertArrayEquals ( bMessage , bEncrypted )
testTarPrefixWithoutTrailingSlash ( ) { commitBazAndFooSlashBar ( ) ; byte [ ] result = org . eclipse . jgit . pgm . CLIGitCommand . executeRaw ( "git<sp>archive<sp>--prefix=my-<sp>--format=tar<sp>master" , db ) . outBytes ( ) ; java . lang . String [ ] expect = new java . lang . String [ ] { "my-baz" , "my-foo/" , "my-foo/bar" } ; java . lang . String [ ] actual = listTarEntries ( result ) ; java . util . Arrays . sort ( expect ) ; java . util . Arrays . sort ( actual ) ; "<AssertPlaceHolder>" ; } sort ( java . util . List ) { java . util . List < org . eclipse . jgit . lib . ConfigLine > sorted = new java . util . ArrayList ( in . size ( ) ) ; for ( org . eclipse . jgit . lib . ConfigLine line : in ) { if ( ( ( line . section ) != null ) && ( ( line . name ) != null ) ) sorted . add ( line ) ; } java . util . Collections . sort ( sorted , new org . eclipse . jgit . lib . ConfigSnapshot . LineComparator ( ) ) ; return sorted ; }
org . junit . Assert . assertArrayEquals ( expect , actual )
testDataStore ( ) { final org . geotoolkit . data . FeatureStore store = getDataStore ( ) ; "<AssertPlaceHolder>" ; } getDataStore ( ) { return store ; }
org . junit . Assert . assertNotNull ( store )
shouldGetItselfWhenSelectCastable ( ) { cn . jimmyshi . beanquery . selectors . BeanSelector < java . util . Set > setBeanSelector = new cn . jimmyshi . beanquery . selectors . BeanSelector < java . util . Set > ( java . util . Set . class ) ; java . util . Set item = new java . util . HashSet ( ) ; java . util . Set result = setBeanSelector . select ( item ) ; "<AssertPlaceHolder>" ; } select ( java . lang . Object ) { return doSelect ( item ) ; }
org . junit . Assert . assertSame ( item , result )
testRun2 ( ) { final int [ ] counter = new int [ ] { 2 } ; org . opencastproject . util . ReflectionUtil . run ( new org . opencastproject . util . ReflectionUtilTest . Bla ( ) { @ org . opencastproject . util . Override public java . lang . String getId ( ) { ( counter [ 0 ] ) -- ; return null ; } @ org . opencastproject . util . Override public int calc ( int v ) { ( counter [ 0 ] ) -- ; return 0 ; } } ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
org . junit . Assert . assertEquals ( 1 , counter [ 0 ] )
constructFromUriAndBack ( ) { java . net . URI uri = java . net . URI . create ( "http://apache.org/foo/bar?foo=bar&a=b&c=d&y=z&foo=zoo#foo" ) ; org . jasig . cas . client . util . URIBuilder builder = new org . jasig . cas . client . util . URIBuilder ( uri ) ; "<AssertPlaceHolder>" ; } build ( ) { try { return new java . net . URI ( buildString ( ) ) ; } catch ( final java . net . URISyntaxException e ) { throw new java . lang . RuntimeException ( e ) ; } }
org . junit . Assert . assertEquals ( uri , builder . build ( ) )